-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yyyy only form #5
Comments
There must be also d and m letters in the date format string. |
Right, but if we want to use this as a Date of Birth collection, in some countries you can only collect year. 'yyyy' is a valid date format as is 'mm yyyy' is also common for DOB. |
That is good point :-) I will investigate this next weekend and check how easy is change current functionality. |
@kekeh |
@ShrikantAdhav I would also need that functionality. |
Now you can give more date formats to the dateFormat option. For example yyyy, mm/yyyy and mmm yyyy. This is implemented in 0.5.6 version. |
When I set the format to 'yyyy' I get the following error:
ERROR TypeError: Cannot read property '0' of null
at UtilService.push.../../node_modules/angular-mydatepicker/fesm5/angular-mydatepicker.js.UtilService.getDateValue (angular-mydatepicker.js:218)
at UtilService.push.../../node_modules/angular-mydatepicker/fesm5/angular-mydatepicker.js.UtilService.isDateValid (angular-mydatepicker.js:146)
at AngularMyDatePickerDirective.push.../../node_modules/angular-mydatepicker/fesm5/angular-mydatepicker.js.AngularMyDatePickerDirective.writeValue (angular-mydatepicker.js:2617)
at setUpControl (forms.js:2057)
at FormGroupDirective.push.../../node_modules/@angular/forms/fesm5/forms.js.FormGroupDirective.addControl (forms.js:5281)
at FormControlName.push.../../node_modules/@angular/forms/fesm5/forms.js.FormControlName._setUpControl (forms.js:5882)
at FormControlName.push.../../node_modules/@angular/forms/fesm5/forms.js.FormControlName.ngOnChanges (forms.js:5803)
at checkAndUpdateDirectiveInline (core.js:22085)
at checkAndUpdateNodeInline (core.js:23353)
at checkAndUpdateNode (core.js:23315)
The text was updated successfully, but these errors were encountered: