Open wqdjl opened 6 years ago
A good idea, I think. Please test and make a PR. Please also consider that user may enter invalid date. 2017-0x-xx
you can valid the value , let date: any = new Date(value); if (date == "Invalid Date")
in Above fix we prefer the Element value rather then default value .. i.e if value is change by user then popup 'll display from user provided value Otherwise/else default value. Thanks @wqdjl for hint......
when i input value 2017-09-05 and reopen the datepicker ,the date picker still show the last value ; eg.![image](https://user-images.githubusercontent.com/14515076/30998223-959372d6-a4ff-11e7-82e7-865c79c0045f.png)
I have the solution, Please update datetime-picker.directive.ts' function ngOnChanges. when user modifying value ,you should be call setInputElDateValue、updateDatepicker eg.
@jiren @lukaselmer @Krisa @boban984