Used method chaining in DateTimeShortcuts.js.
This commit is contained in:
parent
0b98e8fdad
commit
1f726311d1
|
@ -398,11 +398,11 @@
|
||||||
handleCalendarCallback: function(num) {
|
handleCalendarCallback: function(num) {
|
||||||
var format = get_format('DATE_INPUT_FORMATS')[0];
|
var format = get_format('DATE_INPUT_FORMATS')[0];
|
||||||
// the format needs to be escaped a little
|
// the format needs to be escaped a little
|
||||||
format = format.replace('\\', '\\\\');
|
format = format.replace('\\', '\\\\')
|
||||||
format = format.replace('\r', '\\r');
|
.replace('\r', '\\r')
|
||||||
format = format.replace('\n', '\\n');
|
.replace('\n', '\\n')
|
||||||
format = format.replace('\t', '\\t');
|
.replace('\t', '\\t')
|
||||||
format = format.replace("'", "\\'");
|
.replace("'", "\\'");
|
||||||
return function(y, m, d) {
|
return function(y, m, d) {
|
||||||
DateTimeShortcuts.calendarInputs[num].value = new Date(y, m - 1, d).strftime(format);
|
DateTimeShortcuts.calendarInputs[num].value = new Date(y, m - 1, d).strftime(format);
|
||||||
DateTimeShortcuts.calendarInputs[num].focus();
|
DateTimeShortcuts.calendarInputs[num].focus();
|
||||||
|
|
Loading…
Reference in New Issue