Bug Tracker

Modify

Ticket #2229 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

confusion between datepicker_currentDay class and datepicker_today class

Reported by: Zola Owned by: kbwood
Priority: minor Milestone: 1.2.3
Component: ui Version: 1.2.2
Keywords: Cc:
Blocking: Blocked by:

Description

minor-but-annoying.

in the ui.css file, there seems to be a class intended to let you use a different background to differentiate between "today" and "day selected"

I set the current_day to light purple and the datepicker_today class to blue.

See the attached image:

When you open up the calendar, you see that today, January 23rd, is in purple like it's supposed to be. (left calendar view).

However, when I select a day, THAT day is then purple and the current day takes on the blue color (right calendar view)

If I swapped the two around, it still has the same problem, just in reverse--the current day would be blue, and change to purple while the selected day would turn to blue.

I think it's just class confusion--those two class names are very similar and it's hard to tell which class is for today and which is for the selected day, and clearly, that's what got messed up in the code.

Maybe it would be better to rename datepicker_today class to "datepicker_SelectedDate"? It would be nice to be able to use two different colors and have the current day remain the same color and have the selected day a different color.

Attachments

calendar_problem.gif Download (9.6 KB) - added by Zola 5 years ago.
visual of calendar problem.
dpcss.png Download (7.2 KB) - added by kbwood 5 years ago.
Datepicker CSS examples

Change History

Changed 5 years ago by Zola

visual of calendar problem.

comment:1 Changed 5 years ago by kbwood

  • Owner changed from paul to kbwood
  • Status changed from new to assigned

There are three CSS classes involved (see the attached image):

  • datepicker_today marks the date right now.
  • datepicker_currentDate marks the date currently selected in the text control.
  • datepicker_daysCellOver marks the date that would be selected if clicked.

Changed 5 years ago by kbwood

Datepicker CSS examples

comment:2 Changed 5 years ago by kbwood

  • Status changed from assigned to closed
  • Resolution set to fixed

The latest version applies both datepicker_today and datepicker_currentDay if applicable. Previously currentDay overrode today. Also, currentDay is only applied if a date is actually selected, not when the input is blank and the default date is highlighted.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.