Skip to content
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

Datepicker Issue in Angular formly #115

Open
uideveloper569 opened this issue Jan 9, 2018 · 0 comments
Open

Datepicker Issue in Angular formly #115

uideveloper569 opened this issue Jan 9, 2018 · 0 comments

Comments

@uideveloper569
Copy link

uideveloper569 commented Jan 9, 2018

Hi @kentcdodds/Team,

I am trying to generate a form using angular-formly with the below field's json.

vm.fields = [
{
key: 'first_name',
type: 'input',
templateOptions: {
type: 'text',
label: 'First Name',
placeholder: 'Enter your first name',
required: true
}
},
{
key: 'date1',
type: 'datepicker',
templateOptions: {
label: 'Date 1',
type: 'text',
required:true,
datepickerPopup: 'dd-MMMM-yyyy'
}
}];

It is generating two fields i.e. input and date picker.

My issue is whenever i click on date field for the first time, it is indicating error like required field and cannot be left empty.

This error should come only when i leave the field, not when i clicked on the date picker and about to select some date from the calendar.

If you see for the first field "first name", when i click on the field for the first time it is not indicating any error till i leave the field empty. Once the blur event is fired, then only we can see that it is highlighted indicating required field cannot be left empty.

Is there any way that we can stop date picker field indicating error before i made any date selection from calender?

Thanks,

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant