This is due to jQuery UI Datepicker Today Link post
Using the code below, the Today button is displayed in black. However, it only works once, because when the Today button is clicked, it returns to being grayed out. Is there a better way to handle this so that the color rendering is consistent?
$(document).ready(function() { $(".datePicker").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", yearRange: "2000:c+1", showButtonPanel: true }); $('.datePicker').click(function () { $('button.ui-datepicker-current').removeClass('ui-priority-secondary').addClass('ui-priority-primary'); }); });
Update: https://jsfiddle.net/megoo1xk/14/
source share