JQuery DatePicker Background Color

I am using jQuery DatePicker example from link text

on my asp.net page.

But the background color of the date picker is white. I do not know how to change this. (Default color change) My asp.net page page is white, maybe because of this?

Any help would be checked. Thanks.

+6
javascript jquery
source share
5 answers

The background formatting for the control comes from the .ui-widget-content CSS class. Assuming you want to apply dates to the collector and not other controls, you want something like this:

 .ui-datepicker .ui-widget-content { background: #999 none; } 

If instead you want to change the background color for all controls, just find the existing .ui-widget-content class in your CSS and change it.

+9
source share

Just add this line of code to your jquery ui css file

 .ui-datepicker .ui-datepicker-title select{color: #000;} 

This will solve your problem.

+2
source share

You can change the background color of the DatePicker using the CSS file that comes with the package. Search for the class selector .ui-widget-content , there should be a background attribute that you can change to your liking.

+1
source share
+1
source share

With this function you can color the days you want:

 $("#dater").datepicker({ numberOfMonths: 3, }); function ColorDay(month, day, year, backgroundColor) { day--; $("[onclick*='"+month+","+year+"'] [class*=ui-state-default]").eq(day).css("background",backgroundColor); } 

then color per day:

 ColorDay(6,30,2012,"yellow"); // color July 30, 2012 of yellow 
+1
source share

All Articles