If a date is not required, how does one prevent the date picker from setting one?

  • I finally stumbled across Lothar’s solution to the transparent date picker problem. While still stumbling for that, I stumbled across a way to use dijit.form.DateTextBox to pop the calendar instead of using the default.

  • Using dijit.form.DateTextBox allows me to pop the calendar, then leave the field without entering a date value. This is what I want, because this particular date field is optional. This method also allows manual entry of the date without using the calendar.

  • It has three issues, however. First, selectable dates/controls do not show the “hand” that one expects for interactive web things. Second, there’s no explicit indication that the field has a popup control; it simply appears when focus is set. I don’t mind that, but that behaviour means sometimes the picker doesn’t appear until one leaves the field and sets focus again. Third, the rendering isn’t as spiffy.

  • The default has none of the above issue, BUT it forces a value, even when there’s no validation, and nothing configured to require a value in the field. Once that field is in focus, it appears to be completely impossible to leave that field without a value present.

  • I’d like to use the default one, now that it’s no longer transparent. Is there any way to set it to allow nothing to be entered?..

Thanks for your time…