I have a working version of jQuery date picker, Just need to implement 2 more enhancements to it
The calendar function is not invoking while clicking the Date Icon, however if I click the text field it works well. How to fix this?
Clear to today's date button - This presets the date to today's
date, but I want a click event to happen here because I'm calling an
other function when a date change happensviewHistoricFund = function () { $('#historicDate').datepicker({ changeMonth: true, changeYear: true, showButtonPanel: true, dateFormat: "dd MM yy", monthNames: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], minDate:"-5y", maxDate: 'today', onSelect: function(selected,evnt) { showHistoricDate(selected); } }).datepicker("setDate", "0"); }, $("#clear-historic-date-button").click(function (e) { $("#historicDate").datepicker("setDate", new Date()); //Working $("#historicDate").trigger("click"); //Not working viewHistoricFund(); //Not working });
Could you please help to sort out this issue?
Appreciate your help
<>
icon on the text editor toolbar to create a stacksnippet. (like a fiddle) In the HTML section add the jquery from the left side of the page, and only the elements that would appear in the body. You'll likely need to add a CDN links for the datepicker needs to the HTML section as well.