Hello Isomorphic,
I saw that you have DateItem.setStartDate() / setEndDate() with its doc'd restrictions.
Obviously this works only for setUseTextField(false)-DateItems.
Besides the fact that one should have a DateRange-Validator defined, the user could be guided a bit in the DateChooser AutoChild.
Suggestion:
Could you implement a check inside DateChooser (best: using DateItem.setStartDate() / setEndDate()), that changes the DateChooser so that it is not possible to click-select values outside the given range? Perhaps with an configurable error message defaulting to "Please select a date in the range {startDate} - {endDate}"?
If you mark the invalid days like you already mark the "not this month"-days (CSS-class "dateChooserDisabledWeekday", "dateChooserDisabledWeekend"), this would also be good.
This does not prevent the user from entering an unwanted date, but one could use the Validator for that.
Another enhancement (I currently have no use for it, but perhaps you think it is useful) would be something like
Best regards,
Blama
I saw that you have DateItem.setStartDate() / setEndDate() with its doc'd restrictions.
Obviously this works only for setUseTextField(false)-DateItems.
Besides the fact that one should have a DateRange-Validator defined, the user could be guided a bit in the DateChooser AutoChild.
Suggestion:
Could you implement a check inside DateChooser (best: using DateItem.setStartDate() / setEndDate()), that changes the DateChooser so that it is not possible to click-select values outside the given range? Perhaps with an configurable error message defaulting to "Please select a date in the range {startDate} - {endDate}"?
If you mark the invalid days like you already mark the "not this month"-days (CSS-class "dateChooserDisabledWeekday", "dateChooserDisabledWeekend"), this would also be good.
This does not prevent the user from entering an unwanted date, but one could use the Validator for that.
Another enhancement (I currently have no use for it, but perhaps you think it is useful) would be something like
- DateChooser.setWeekDaysAllowed(boolean)
- DateChooser.setWeekEndsAllowed(boolean)
- DateChooser.setDisallowedDays(Date...) (for public holidays)
Best regards,
Blama
Comment