Opened 16 years ago
Closed 16 years ago
#2351 closed bug (fixed)
Datepicker - awkward handling of default date
Reported by: | adsmart | Owned by: | kbwood |
---|---|---|---|
Priority: | major | Milestone: | 1.2.4 |
Component: | ui | Version: | 1.2.3 |
Keywords: | datepicker | Cc: | |
Blocked by: | Blocking: |
Description
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.
Attachments (1)
Change History (4)
Changed 16 years ago by
Attachment: | ui.datepicker.errors.html added |
---|
comment:1 Changed 16 years ago by
Owner: | changed from paul to iMarc |
---|
comment:2 Changed 16 years ago by
Owner: | changed from iMarc to kbwood |
---|
comment:3 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks for the comments. I'll implement them as follows: