Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes and improvements on current/selected day highlight #19

Open
GoogleCodeExporter opened this issue Apr 24, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

Hi, 

I noticed that when the current day (today) is on the first week of the painted 
month, it does not get the 'today' class. 

Problem is, when filling the first week inside _buildCalendar, no class is 
specified ever:

        /* The first week */
        for (var j = startIndex; j < 7; j++) {
            a_d[0][j] = {
                d: daysIndex
    , m: currentMonth
    , y: currentYear
    , b: badDates[daysIndex]
            };
            daysIndex++;
        }

I have fixed this, and added another small improvement to highlight both the 
"today" (current day), and the "selected" date (that is, the currently selected 
value. 

The fix and improvement is simple, I am attaching a patch. 

Also, you will need to change the .css as desired to reflect the new 
highlights. I have changed the:

div.datepicker table tbody tr td.today {
   ...
}

style to:

div.datepicker table tbody tr td.today {
 font-weight: bold;
}

div.datepicker table tbody tr td.selected {
 background: #c4d5e3;
}

Original issue reported on code.google.com by airadier on 2 Aug 2012 at 10:13

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant