Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 128613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:39:48+00:00 2026-05-11T05:39:48+00:00

I’m using the datepicker control for jquery and all is well except that I

  • 0

I’m using the datepicker control for jquery and all is well except that I cannot get it to highlight the currently selected input value (or the current date for that matter). Even though I have s valid date value in my text input and can get the datepicker to return the correct month / year, I cannot get it to highlight that date on the calendar.

Here is my code:

$('.date_picker').datepicker({ dateFormat: 'dd/mm/yy', duration: '', gotoCurrent: true, defaultDate: -1}); 

..and here is the stylesheet:

/*datepicker*/ /* Main Style Sheet for jQuery UI date picker */ .ui-datepicker-div, .ui-datepicker-inline, #ui-datepicker-div {     /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;     font-family: Verdana, Arial, sans-serif;     background: #ffffff url(images/ffffff_40x100_textures_01_flat_0.png) 0 0 repeat-x;     font-size: 0.80em;     border: 4px solid #dddddd;     width: 15.5em;     padding: 2.5em .5em .5em .5em;     position: relative; } .ui-datepicker-div, #ui-datepicker-div {     z-index: 9999; /*must have*/     display: none; } .ui-datepicker-inline {     float: left;     display: block; } .ui-datepicker-control {     display: none; } .ui-datepicker-current {     display: none; } .ui-datepicker-next, .ui-datepicker-prev {     position: absolute;     left: .5em;     top: .5em;     background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x; } .ui-datepicker-next {     left: 14.6em; } .ui-datepicker-next:hover, .ui-datepicker-prev:hover {     background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x; } .ui-datepicker-next a, .ui-datepicker-prev a {     text-indent: -999999px;     width: 1.3em;     height: 1.4em;     display: block;     font-size: 1em;     background: url(images/888888_7x7_arrow_left.gif) 50% 50% no-repeat;     border: 1px solid #d3d3d3;     cursor: pointer; } .ui-datepicker-next a {     background: url(images/888888_7x7_arrow_right.gif) 50% 50% no-repeat; } .ui-datepicker-prev a:hover {     background: url(images/454545_7x7_arrow_left.gif) 50% 50% no-repeat; } .ui-datepicker-next a:hover {     background: url(images/454545_7x7_arrow_right.gif) 50% 50% no-repeat; } .ui-datepicker-prev a:active {     background: url(images/222222_7x7_arrow_left.gif) 50% 50% no-repeat; } .ui-datepicker-next a:active {     background: url(images/222222_7x7_arrow_right.gif) 50% 50% no-repeat; } .ui-datepicker-header select {     border: 1px solid #d3d3d3;     color: #555555;     background: #e6e6e6;     font-size: 1em;     line-height: 1.4em;     position: absolute;     top: .5em;     margin: 0 !important; } .ui-datepicker-header option:focus, .ui-datepicker-header option:hover {     background: #dadada; } .ui-datepicker-header select.ui-datepicker-new-month {     width: 7em;     left: 2.2em; } .ui-datepicker-header select.ui-datepicker-new-year {     width: 5em;     left: 9.4em; } table.ui-datepicker {     width: 15.5em;     text-align: right; } table.ui-datepicker td a {     padding: .1em .3em .1em 0;     display: block;     color: #555555;     background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;     cursor: pointer;     border: 1px solid #ffffff; } table.ui-datepicker td a:hover {     border: 1px solid #999999;     color: #212121;     background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x; } table.ui-datepicker td a:active {     border: 1px solid #dddddd;     color: #222222;     background: #ffffff url(images/ffffff_40x100_textures_02_glass_65.png) 0 50% repeat-x; } table.ui-datepicker .ui-datepicker-title-row td {     padding: .3em 0;     text-align: center;     font-size: .9em;     color: #222222;     text-transform: uppercase; } table.ui-datepicker .ui-datepicker-title-row td a {     color: #222222; } .ui-datepicker-cover {     display: none;     display/**/: block;     position: absolute;     z-index: -1;     filter: mask();     top: -4px;     left: -4px;     width: 193px;     height: 200px; } 

I’m using IE7 to test, but I see the same behaviour in Firefox.

Any ideas as to the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T05:39:49+00:00Added an answer on May 11, 2026 at 5:39 am

    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 IE6 compared to later browsers (Firefox 3, Chrome, IE7).

    For example, IE6 appears to ignore the background colour for weekend days.

    The background colour of the currently selected date and today’s date are both controlled through CSS. The default CSS for the last datepicker is the main flora style sheet, although I see that there is a new version/stylesheet of the datepicker (I haven’t had a proper read yet, I believe it may be a new version) on the jQuery site this week.

    The relevant default names of the classes within the stylesheet that you would need to change the background colours for are –

     /* current input value background color */ .ui-datepicker-current-day {     background: #83C948 } /* today's background color */ .ui-datepicker-today  {     background: #83C948 } 

    EDIT:

    If you are using the old Datepicker as is, then these are the relevant lines in the plugin js file-

    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) 

    Therefore, you will either

    • need these CSS classes in your CSS stylesheet to highlight today and currently selected date

    or

    • you will need to change the names in the plugin js file and use the same names for classes in your CSS stylesheet

    Personally, I would opt for the former as they are they are the commonly known class names.

    EDIT 2:

    It appears that the new datepicker uses slightly different CSS to colour current selected date and today’s date. Whereas the previous version styled the table cell (td) element, the new version styles the anchor (a) element inside the cell.

    Using Firebug in Firefox 3 (highly recommended), the CSS to colour today appears to be

    .ui-state-highlight, .ui-widget-content .ui-state-highlight  {     background:#FFE45C url(../images/?new=ffe45c&w=1&h=100&f=png&q=100&fltr[]=over|textures/03_highlight_soft.png|0|0|75) repeat-x scroll 50% top;     border:1px solid #FED22F;     color:#363636; } 

    and for the current selected date in the input, it is

    .ui-state-active, .ui-widget-content .ui-state-active  {     background:#FFFFFF url(../images/?new=ffffff&w=1&h=400&f=png&q=100&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; } 

    These both come from the jQuery UI CSS Framework

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Are you running on OS 3.0? I saw the same… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer It looks like you need to register Apache::Session::Memcached with Apache::Session::Wrapper,… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer Use DATENAME or DATEPART: SELECT DATENAME(dw,GETDATE()) -- Friday SELECT DATEPART(dw,GETDATE())… May 12, 2026 at 1:19 am

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am currently running into a problem where an element is coming back from
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.