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 61 forks source link

set empty value to date picker #87

Closed mmirzaeyan closed 6 years ago

mmirzaeyan commented 6 years ago

i want to set an empty value to dateObject :

dateObject = moment('1395-11-22','jYYYY,jMM,jDD');

<dp-date-picker 
   dir="rtl"
   [(ngModel)]="dateObject"
   mode="day"
   placeholder="تاریخ"
   theme="dp-material">
 </dp-date-picker>

if i set the dateObject to empty like this : this.dateObject=""; and next time when i want to get date with dateObject.format(this.dateObject,"fa" ,"YYYY/MM/DD) i get and error that said dateObject.format its not a function . how can i solve this ?

fingerpich commented 6 years ago

Please make a demo for you questions