fingerpich / jalali-angular-datepicker

Highly configurable jalali (shamsi, khorshidi, persian) date picker built for Angular ( 2 or more ) applications
https://fingerpich.github.io/jalali-angular-datepicker/
MIT License
152 stars 60 forks source link

Invalid Jalali year -100721 in dp-date-picker #118

Open babakir opened 4 years ago

babakir commented 4 years ago

I'm using ng2-jalali-date-picker in angular 8 and select data from db and show on a table,I need to edit some records and show selected record fields on a form with db-date-picker component but in date filed that ‍‍‍map to db-date-picker occur ERROR Error: Invalid Jalali year -100721.

<dp-date-picker dir="rtl" [config]="datePickerConfig" mode="daytime" theme="dp-material custome-date" formControlName="time" name="created_at"> </dp-date-picker>

public datePickerConfig = { format: 'yyyy/MM/dd' }

The field on table :

<td class="text-center"> {{ customerTdf.tdf.created_at | date: 'yyyy/MM/dd' }} </td>

The date that come from db is like‍‍‍‍‍‍ :‍‍‍‍‍‍‍398-11-30T19:36:44+03:25 ‍‍‍‍‍‍‍‍‍‍ ‍‍‍‍‍‍‍‍‍‍‍thanks for your help