Closed gufi closed 7 years ago
The methods momentFormatDate and momentParse appear to still be called reguardless of overriding the methods in the example.
Personally I don't mind importing moment.js but figured I would notify that overriding them does not work as expected if you don't.
doing the following will however allow full override
// Override Date object formatter DateTime.formatDate = (date: Date,dateOnly:boolean) : string => { return date.toDateString(); }; DateTime.momentFormatDate = (date: Date, dateFormat:string): string=> { return DateTime.formatDate(date,true);}; // Override Date object parser DateTime.parse = (str: any): Date => { return new Date(str); } ; DateTime.momentParse = DateTime.parse;
Thank you for reporting this. I will look into it later
released with 0.11.0 please verify the change.
oh!this is what i want
The methods momentFormatDate and momentParse appear to still be called reguardless of overriding the methods in the example.
Personally I don't mind importing moment.js but figured I would notify that overriding them does not work as expected if you don't.
doing the following will however allow full override