mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-16 15:33:02 +01:00
Arian : Mootools-datepicker : Parse date with the option format first (propose on github https://github.com/arian/mootools-datepicker/pull/50)
This commit is contained in:
parent
de2336f68e
commit
10ef09c5e7
1 changed files with 4 additions and 1 deletions
|
@ -115,7 +115,10 @@ this.DatePicker = Picker.Date = new Class({
|
||||||
}
|
}
|
||||||
this.date = new Date();
|
this.date = new Date();
|
||||||
if (input){
|
if (input){
|
||||||
var date = Date.parse(input.get('value'));
|
var date = Date.parse(input.get('value'),options.format);
|
||||||
|
if (date == null){
|
||||||
|
date = Date.parse(input.get('value'));
|
||||||
|
}
|
||||||
if (date == null || !date.isValid()){
|
if (date == null || !date.isValid()){
|
||||||
var storeDate = input.retrieve('datepicker:value');
|
var storeDate = input.retrieve('datepicker:value');
|
||||||
if (storeDate) date = Date.parse(storeDate);
|
if (storeDate) date = Date.parse(storeDate);
|
||||||
|
|
Loading…
Reference in a new issue