I did not learn it in my previous project. I just did it for my own purpose. Recently, I have read some JS frameworks because of my changing needs and mentality, I have a deep understanding of Js.
In the future, the official library will be modified and the items developed by myself will be organized for reuse in future projects.
Find jquery. UI. datepicker. js and jquery. UI. datepicker-zh-CN.js
Set jquery. UI. datepicker. js content
this.regional[''] = { // Default regional settingscloseText: 'Done', // Display text for close linkprevText: 'Prev', // Display text for previous month linknextText: 'Next', // Display text for next month linkcurrentText: 'Today', // Display text for current month linkmonthNames: ['January','February','March','April','May','June','July','August','September','October','November','December'], // Names of months for drop-down and formattingmonthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formattingdayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formattingdayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formattingdayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at SundayweekHeader: 'Wk', // Column header for week of the yeardateFormat: 'yyyymmdd', // See format options on parseDatefirstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...isRTL: false, // True if right-to-left language, false if left-to-rightshowMonthAfterYear: false, // True if the year select precedes month, false for month then yearyearSuffix: '' // Additional text to append to the year in the month headers};
Replace
This. regional ['zh-cn'] = {closetext: 'close', prevtext: '<last month', nexttext: 'Next month> ', currenttext: 'Today', monthnames: ['October ', 'October ', 'October ', 'October', 'October '], monthnamesshort: ['October', 'October ', 'August 22, ', 'August 22,', 'August 22, ', 'August 22,'], daynames: ['sunday', 'monday', 'tuesday ', 'wedday', 'thurday', 'Friday', 'saturday'], daynamesshort: ['sunday', 'monday', 'tues', 'wedday', 'thurday ', 'Friday', 'satur'], daynamesmin: ['day', 'yi', '2', '3', '4', '5 ', '6'], weekheader: 'Week', dateformat: 'yy-mm-dd', firstday: 1, isrtl: false, showmonthafteryear: True, yearsuffix: 'Year '};
And modify
$. Extend (this. _ defaults, this. Regional ['zh-cn']);