Clearing Calendar date value


I am using the DHTMLCalendar attached to a readonly textfield, as in many of your examples. However, I can find no way for the user to clear the date field (ie. set it to empty) after having selected it. Do I need to create a custom control with a custom javascript function to do this, or is there a better (and easier) way that is integrated with the calendar object?




Do you want to clear value of the input field ?

If you do, you can just set empty value to the input element:


Yes, that is exactly what i want to do. I know how to do it, but I want the USER to be able to do it, so i need some action they can take to cause the field to be cleared out. I was hoping there was something built into the calendar control (like an option for a ‘Reset’ button or something), but if there is not, I will simply have create an additional anchor for each calendar text input so that the user can click it and clear out the field.

Unfortunately, there is not built-in “reset” button in calendar.


Sorry for the misleading information. Actually calendar provides “C” button that clears an input.

The sample of usage is attached to the post … mal&q=9224