JQuery UI Datepicker, reverse the order of the year in the dropdowns -
I have a datekeeping with Changee: True. The 'Year' drop down shows the title as 2009, then compared to the next year, down from the title of 2008, 2007, 2006 and so on in 1999 and counting towards the top I want to reverse this order Unable to find an easy solution for?
I would not recommend editing as the original UIDticker.JS has been suggested because your changes are expedited Will be lost because you or any other developer file changes when a new version is released. It is not practical to remember what is being optimized to reapply. Instead, you can override the existing _generateMonthYearHeader
method in your own separate JS:
// store is original so we can call it under our overriding method $ .datepicker .generateMonthYearHeader_original = $ .datepicker._generateMonthYearHeader; $ .Datepicker._generateMonthYearHeader = function (inst, dm, dy, mnd, mxd, s, mn, mns) {var header = $ ($. Datepicker._generateMonthYearHeader_original (inst, dm, dy, mnd, mxd, s, mn, MNS), year = header.find ('.ui-datepicker-year'); // Specify the years of years (protropy prototype .replus.apply (years (child ())); // Come back to our new HTML return ('& lt; div / & gt;') Append (headers). Html (); }
I wrote it for the item I'm working on and it tricks it well :)
Comments
Post a Comment