Closed Rob-Post closed 7 years ago
This is an enviornmental issue. It works with Chrome, but with others OS, e.g., IE. We may improve it with checking an exception with an invalid date value.
I disagree, I experience this issue in
Running on Windows 10 Version 1607 14393.693
Thanks for fixing this issue! Now my application doesn't crash anymore.
However, when displaying the initial value the date isn't formatted with the custom function I set via Ng2Datetime.formatDate. It now displays 2017-01-31T00:00:00+01:00 instead of 31-01-2017.
When selecting a date in the datepicker, the date gets formatted in the correct format.
This behaviour is also visible in the demo plunker.
I'm still having this issue.
Using:
ng2-datetime-picker:
0.14.3
Chrome:Version 56.0.2924.87 (64-bit)
Situation:
Entering letters or whitespace in the input field > clicking away (blur) > clicking back on the input.
<input type="text" id="date_start"
formControlName="date_start"
ng2-datetime-picker date-only="true"
placeholder="DD-MM-YYYY" date-format="DD-MM-YYYY">
TypeError: Cannot read property 'fullName' of undefined
at Ng2Datetime.getMonthData (ng2-datetime.js:113)
at Ng2DatetimePickerComponent.ngOnInit (ng2-datetime-picker.component.js:86)
at Wrapper_Ng2DatetimePickerComponent.ngDoCheck (/Ng2DatetimePickerModule/Ng2DatetimePickerComponent/wrapper.ngfactory.js:175)
at CompiledTemplate.proxyViewClass.View_Ng2DatetimePickerComponent_Host0.detectChangesInternal (/Ng2DatetimePickerModule/Ng2DatetimePickerComponent/host.ngfactory.js:34)
at CompiledTemplate.proxyViewClass.AppView.detectChanges (view.js:425)
at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (view.js:620)
...
Thank you for your time.
@mihailomisic I cannot reproduce with the give info. Please create a plunker example with your browser info.
@allenhwkim Thank you for the fast response.
Just click the input field and you'll receive the error I've mentioned.
If you remove the whitespace I've set in the FormBuilder, it will work. But if you then add whitespace or letters manually, and click away, the error is there.
Hmm, the code is trying to to parse ' '
. I will see what I can do.
@nickthakkar @ndcunningham Do you want to look into this?
Hi there, any progress in this case?
@maciej-karpus this has been fixed and released.
Steps to reproduce: