Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8277 closed bug (duplicate)

DatePicker defaultDate not highlighted

Reported by: chipmunk Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.datepicker Version: 1.8.19
Keywords: Cc:
Blocked by: Blocking:

Description

When specifying a default date, the popup calendar shows the correct calendar month, but does not highlight the default date. The default date only gets the hover state, which disappears as soon as you mouse over the calendar.

This contradicts the documentation for the defaultDate option, which says "Set the date to highlight on first opening if the field is blank."

This is the same issue as #5676. The fix for that caused #5984, so the fix was reverted, restoring the original bug.

http://jsfiddle.net/CdaCn/

Change History (5)

comment:1 Changed 7 years ago by chipmunk

What is the correct behavior, so that the default date is properly highlighted?

  • The default date's <td> has the class this._currentClass (e.g. 'ui-datepicker-current-day')
  • The default date's <a> has the class 'ui-state-active'
  • Both of the above
  • Something else

comment:2 Changed 7 years ago by mrozik

If we wanna add 'ui-state-active' class to a date configured as default, we should also set this value in the input field. It will be consistient across plugin. Maybe 'highlight' in this context means 'hover', but this should be corrected in docs.

comment:3 Changed 7 years ago by mrozik

duplicate of #8170

comment:4 Changed 7 years ago by Scott González

Resolution: duplicate
Status: newclosed

comment:5 Changed 7 years ago by Scott González

Duplicate of #8170.

Note: See TracTickets for help on using tickets.