I’ve a dhtmlxform with 5 differents items (type = “calendar”).
I use it for : display dates in good format (with dateformat) and let the user change the dates with the calendar
But for 2 of the 5 dates field i don’t want let the user able to change the dates. I want only display the date.
If i use readonly directive in xml file, the user can’t change the date in the field but can change the date with the calendar.
How can i disable the calendar but keep the dateformat for those 2 dates ?
you may disable dates using setSensitiveRange(start,end) method of the calendar. And calendar date is defined, you may use the following approach to make only this date available:
var myCalendar = myForm.getCalendar(“start_date”);
var date = myCalendar.getDate()
myCalendar.setSensitiveRange(date,date);