From f42f2386b697341a660bb0549d6a2323e37cf321 Mon Sep 17 00:00:00 2001 From: Marcos Souza Date: Wed, 5 Jul 2017 15:07:04 -0300 Subject: [PATCH] Update de settings and include todayDate I needed change date value from button today to yesterday, so I added new todayDate settings and now it's possible custom the today date button if someone will need. --- src/definitions/modules/calendar.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/definitions/modules/calendar.js b/src/definitions/modules/calendar.js index cef8747..77e7256 100644 --- a/src/definitions/modules/calendar.js +++ b/src/definitions/modules/calendar.js @@ -176,7 +176,7 @@ var i, r, c, p, row, cell, pageGrid; var mode = module.get.mode(); - var today = new Date(); + var today = settings.todayDate || new Date(); var date = module.get.date(); var focusDate = module.get.focusDate(); var display = focusDate || date || settings.initialDate || today; @@ -997,6 +997,7 @@ firstDayOfWeek: 0, // day for first day column (0 = Sunday) constantHeight: true, // add rows to shorter months to keep day calendar height consistent (6 rows) today: false, // show a 'today/now' button at the bottom of the calendar + todayDate: null, // default date to today button (can be change to other day) closable: true, // close the popup after selecting a date/time monthFirst: true, // month before day when parsing/converting date from/to text touchReadonly: true, // set input to readonly on touch devices