EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
datepicker change month event
Yuri Kuznetsov7d37a6ab5540
diff --git a/client/src/ui/datepicker.js b/client/src/ui/datepicker.jsindex 23a1ae67f5..8e464cbb2c 100644--- a/client/src/ui/datepicker.js+++ b/client/src/ui/datepicker.js@@ -67,6 +67,7 @@ class Datepicker {* hasMonth?: function(string): boolean,* hasYear?: function(string): boolean,* onChangeDate?: function(),+ * onChangeMonth?: function(string),* }} options*/constructor(element, options) {@@ -185,6 +186,13 @@ class Datepicker {if (options.onChangeDate) {options.onChangeDate();}+ })+ .on('changeMonth', (/** {date: Date} */event) => {+ if (options.onChangeMonth) {+ const dateString = moment(event.date).startOf('month').format(options.format);++ options.onChangeMonth(dateString);+ }});if (element.classList.contains('input-group') && !(element instanceof HTMLInputElement)) {