<sp-date-picker> keeps throwing 'isInvalid' error everywhere

xiaix
Tera Guru

When the <sp-date-picker> element loads, changes, anything... I keep getting this error.

I'm in Kingston, Patch 2.

Wherever I'm using this date picker, I can't capture any dates.

 

find_real_file.png

 

find_real_file.png

 

 

1 ACCEPTED SOLUTION

xiaix
Tera Guru

Figured it out.

 

find_real_file.png

 

In the <sp-date-picker>, you NEEDfield attribute, and it should (must?) be the same as your ng-model.

 

Once this is done, bam... no more errors and the date picker works fine.

 

Not sure when they added the necessity for a "field" attribute in the <sp-date-picker> directive, but alas you do!

View solution in original post

10 REPLIES 10

Interesting.  Not sure why binding the "field" attribute to the same as your ng-model didn't work, but I'm glad you got it working.

Mine still works too.

Superb. For us this date picker broke after london upgrade. Now its working again after adding field attribute with same variable as ng-model.

Hi,

I got same issue when upgraded to orlando 

may i know in which widget i need to add?

 

TIA

Kim Kronborg
Kilo Expert

Hi David,

I have the same problem with <sp-date-picker> but I still get the invalid error when I name field and ng-model the same. My directive looks like this :

<div class="form-group">
<label>Start Time</label>
<sp-date-picker field="data.mydatePicker" sn-include-time="true" ng-model="data.mydatePicker"></sp-date-picker>
</div>

Did you find other issues that could cause this invalid message ?

Thanks

Regards

Kim

I have run into this same issue. Were you able to find a work around or solution to it?