Ahmed Ahmed - 1 year ago 179
Javascript Question

jQuery DatePicker Not Highlighting in Custom Style Sheet

I am using the jQuery DatePicker and i've got the following code which is supposed to change the default date to the one I have specified, in this example it is supposed to default and highlight 18th August 2017.

<script type="text/javascript">
jQuery("#date").datepicker({dateFormat: 'yy-mm-dd'});
jQuery("#date").datepicker('setDate', new Date('2017-08-18'));

However, although it does actually default to date, if I use my default stylesheet provided in my theme template then it does't actually highlight the date and remove the old default highlighted day.

If I use the jQuery example stylesheet below, then it seems to work:


But if I use the stylesheet below provided in my theme, then it doesnt work:


Any ideas how I can fix this?

Answer Source

I think that will work perfectly . I just tried that in shamcey demo page in the console . It worked perfectlyenter image description here

this is after i executed the code

enter image description here

Add this style in your style sheet


"#a5d2ff" is the color . You can replace with what ever color you want. This is the screen shot after i added that style enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download