Categories | Question details Back To List | ||
DhtmlxCalendar Hi! I am using dhtmlxCalendar.I am using date format as DD-MON-YYYY for ex-10-FEB-2009.I have to give validation based on this format such that startDate must be less than end date. I have tried through this approach: if(Date.parse(document.getElementById("startDate").value)>Date.parse(document.getElementById("endDate").value) { confirm("start date must be less than end date"); } it giving me values as "NaN". Please update me how to give date validation in DD-MON-YYYY format Answer posted by Alex (support) on Apr 03, 2009 05:28 Hello, There is getDate() method is returns selected date in teh calendar. var date = cal.getDate(); Then you can apply any formating to this value: var str = cal.getFormatedDate(dateformat, date); |