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