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
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);