Datepicker - awkward handling of default date
|Reported by:||adsmart||Owned by:||kbwood|
I have noticed several issues with the way that dates are handled.
By default, when you attach the datepicker, it defaults to today. However, if you set the min date to be "+1d", the default date is still today. It seems to me that shouldn't be possible.
I also notice that when today is picked, only datepicker_currentDay is given to the cell, datepicker_today is missing. This is a mistake. The two properties are not mutually exclusive; I might want identify the current day by changing to border colour and today by changing the font colour.
Finally, if you activate the calendar with no value in the text field, and close it (but not cancel) without selecting a date no value is populated in the text field. This is unexpected, because the default date shows as selected. If I want the default date, I have a visual cue that it is already selected, I might then choose to close (or click elsewhere) because I think that date is already selected. My suggestion is that the default date can show the mouseOver state, or use a new classname. Using mouse over has the better behaviour that its clear the default value is not actually selected. Or make sure the date is populated in the text field on close.
I've attached an HTML file with a date picker showing the first issues. The last issue can be seen with the second datepicker where you can see the last effect, simply open then close the control.