Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First of all, which browser(s) are you viewing the datepicker in? I have noticed that some colouring of dates/sections within the datepicker look different in <strong>IE6</strong> compared to later browsers (<strong>Firefox 3, Chrome, IE7</strong>). </p> <p>For example, IE6 appears to ignore the background colour for weekend days.</p> <p>The background colour of the currently selected date and today's date are both controlled through CSS. The default CSS for the <a href="http://docs.jquery.com/UI/Datepicker" rel="noreferrer">last datepicker</a> is the <a href="http://ui.jquery.com/latest/themes/flora/flora.datepicker.css" rel="noreferrer">main flora style sheet</a>, although I see that there is a <a href="http://ui.jquery.com/demos/datepicker" rel="noreferrer">new version/stylesheet of the datepicker</a> (I haven't had a proper read yet, I believe it may be a new version) on the <a href="http://jquery.com/" rel="noreferrer">jQuery</a> site this week. </p> <p>The relevant default names of the classes within the stylesheet that you would need to change the background colours for are -</p> <pre><code> /* current input value background color */ .ui-datepicker-current-day { background: #83C948 } /* today's background color */ .ui-datepicker-today { background: #83C948 } </code></pre> <p><strong>EDIT:</strong></p> <p>If you are using the <a href="http://docs.jquery.com/UI/Datepicker" rel="noreferrer">old Datepicker as is</a>, then these are the relevant lines in the plugin js file-</p> <pre><code>this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class (printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + ... // highlight today (if different) </code></pre> <p>Therefore, you will either </p> <ul> <li>need these CSS classes in your CSS stylesheet to highlight today and currently selected date</li> </ul> <p>or </p> <ul> <li>you will need to change the names in the plugin js file and use the same names for classes in your CSS stylesheet</li> </ul> <p>Personally, I would opt for the former as they are they are the commonly known class names.</p> <p><strong>EDIT 2:</strong></p> <p>It appears that the <a href="http://ui.jquery.com/demos/datepicker" rel="noreferrer">new datepicker</a> uses slightly different CSS to colour current selected date and today's date. Whereas the previous version styled the table cell (<em>td</em>) element, the new version styles the anchor (<em>a</em>) element inside the cell.</p> <p>Using <a href="http://getfirebug.com/" rel="noreferrer">Firebug</a> in Firefox 3 (highly recommended), the CSS to colour today appears to be</p> <pre><code>.ui-state-highlight, .ui-widget-content .ui-state-highlight { background:#FFE45C url(../images/?new=ffe45c&amp;w=1&amp;h=100&amp;f=png&amp;q=100&amp;fltr[]=over|textures/03_highlight_soft.png|0|0|75) repeat-x scroll 50% top; border:1px solid #FED22F; color:#363636; } </code></pre> <p>and for the current selected date in the input, it is</p> <pre><code>.ui-state-active, .ui-widget-content .ui-state-active { background:#FFFFFF url(../images/?new=ffffff&amp;w=1&amp;h=400&amp;f=png&amp;q=100&amp;fltr[]=over|textures/02_glass.png|0|0|65) repeat-x scroll 50% 50%; border:1px solid #FBD850; color:#EB8F00; font-weight:bold; outline-color:-moz-use-text-color; outline-style:none; outline-width:medium; } </code></pre> <p>These both come from the <a href="http://ui.jquery.com/applications/themeroller/css/parseTheme.css.php?ctl=themeroller&amp;tr=&amp;ffDefault=Trebuchet+MS,+Tahoma,+Verdana,+Arial,+sans-serif&amp;fwDefault=bold&amp;fsDefault=1.1em&amp;cornerRadius=4px&amp;bgColorHeader=f6a828&amp;bgTextureHeader=12_gloss_wave.png&amp;bgImgOpacityHeader=35&amp;borderColorHeader=e78f08&amp;fcHeader=ffffff&amp;iconColorHeader=ffffff&amp;bgColorContent=eeeeee&amp;bgTextureContent=03_highlight_soft.png&amp;bgImgOpacityContent=100&amp;borderColorContent=dddddd&amp;fcContent=333333&amp;iconColorContent=222222&amp;bgColorDefault=f6f6f6&amp;bgTextureDefault=02_glass.png&amp;bgImgOpacityDefault=100&amp;borderColorDefault=cccccc&amp;fcDefault=1c94c4&amp;iconColorDefault=ef8c08&amp;bgColorHover=fdf5ce&amp;bgTextureHover=02_glass.png&amp;bgImgOpacityHover=100&amp;borderColorHover=fbcb09&amp;fcHover=c77405&amp;iconColorHover=ef8c08&amp;bgColorActive=ffffff&amp;bgTextureActive=02_glass.png&amp;bgImgOpacityActive=65&amp;borderColorActive=fbd850&amp;fcActive=eb8f00&amp;iconColorActive=ef8c08&amp;bgColorHighlight=ffe45c&amp;bgTextureHighlight=03_highlight_soft.png&amp;bgImgOpacityHighlight=75&amp;borderColorHighlight=fed22f&amp;fcHighlight=363636&amp;iconColorHighlight=228ef1&amp;bgColorError=b81900&amp;bgTextureError=08_diagonals_thick.png&amp;bgImgOpacityError=18&amp;borderColorError=cd0a0a&amp;fcError=ffffff&amp;iconColorError=ffd27a&amp;bgColorOverlay=666666&amp;bgTextureOverlay=08_diagonals_thick.png&amp;bgImgOpacityOverlay=20&amp;opacityOverlay=50&amp;bgColorShadow=000000&amp;bgTextureShadow=01_flat.png&amp;bgImgOpacityShadow=10&amp;opacityShadow=20&amp;thicknessShadow=5px&amp;offsetTopShadow=-5px&amp;offsetLeftShadow=-5px&amp;cornerRadiusShadow=5px" rel="noreferrer">jQuery UI CSS Framework</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload