Datepicker: calendar ignore input date if current year outside limits and no year in dateFormat

Datepicker: calendar ignore input date if current year outside limits and no year in dateFormat

Hello everyone,

I have found some weird behavior using the datepicker widget...

Basically, if you define limits using minDate and maxDate, and if your dateFormat does NOT contains a "year" field, the synchronization between the field and calendar will be somewhat lost:
- Opening the calendar will always display maxDate or minDate (depending on how your limits are set), ignoring any day or month currently selected.
- Editing the field will not update on-the-fly the calendar selection as usual.

Proof: http://jsfiddle.net/kZvm9/

This behavior could probably be explained by the fact that datepicker always use the current date to fill a missing year, ignoring any minDate or maxDate specified, which seems just wrong.

Possible alternatives could be:
- Use implicitly the year of either minDate, maxDate, or defaultDate instead.
- Define some new attribute to deal with such case cleanly.

In all cases, the "desynchronized" behavior described here should surely never happens, independently of the configuration of your datepicker.

Any thought appreciated,
Marc