mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
- fix: unable to use 'j M Y ' short date format in duedate picker (closes GH-128)
This commit is contained in:
parent
0d1da0db87
commit
6f5f329c12
1 changed files with 8 additions and 4 deletions
|
|
@ -107,7 +107,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
this.__lang = lang;
|
||||
this.daysMin = this.__lang.daysMin;
|
||||
this.daysLong = this.__lang.daysLong;
|
||||
this.monthsShort =this.__lang.monthsLong; //this.__lang.monthsShort;
|
||||
this.monthsShort = this.__lang.monthsShort;
|
||||
this.monthsLong = this.__lang.monthsLong;
|
||||
},
|
||||
|
||||
|
|
@ -902,16 +902,19 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
|
||||
duedatepickerformat: function()
|
||||
{
|
||||
if(!this.options.duedatepickerformat) return 'yy-mm-dd';
|
||||
if (!this.options.duedatepickerformat)
|
||||
return 'yy-mm-dd';
|
||||
|
||||
var s = this.options.duedatepickerformat.replace(/(.)/g, function(t,s) {
|
||||
const s = this.options.duedatepickerformat.replace(/(.)/g, function(t,s) {
|
||||
switch(t) {
|
||||
case 'Y': return 'yy';
|
||||
case 'y': return 'yy';
|
||||
case 'd': return 'dd';
|
||||
case 'j': return 'd';
|
||||
case 'm': return 'mm';
|
||||
case 'M': return 'M';
|
||||
case 'n': return 'm';
|
||||
case ' ':
|
||||
case '/':
|
||||
case '.':
|
||||
case '-': return t;
|
||||
|
|
@ -919,7 +922,8 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
}
|
||||
});
|
||||
|
||||
if(s == '') return 'yy-mm-dd';
|
||||
if (s == '')
|
||||
return 'yy-mm-dd';
|
||||
return s;
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue