Open ghost opened 8 years ago
I'm sorry I just discovered I do could attach files. Here is the code :
Hi @trichetriche , you have to configure the provider in the config phase like this
.config(($mdpDatePickerProvider) => { 'ngInject'; $mdpDatePickerProvider.setDisplayFormat('DD/MM/YYYY'); })
(im using es6)
Hi @BkSouX , I have already done that. It is not working because of that line that overrides whatever format I give. As I said, a setDisplayFormat
method is available but never called. Thus, the DISPLAY_FORMAT
constant is always the same value, and so overrides the format you give as parameter.
When calling the mdPicker service, you can give it a
displayFormat
parameter which allows the date on the side of the calendar to be changed.But no matter the value, it's overridden by a constant in the code, in the DatePicker file at line 119 :
A function
setDisplayFormat
exists but is never called though.