How to clear datepicker box control by default

I am using datepicker in my form after selecting some condition text box will invisible and datepicker control will come.i am entering some text in textbox before selecting date condition when i select date condition that textbox will disappear and datepicker come but some text is coming in that datepicker.


Thanks With Regards

Sunil Suryawanshi



1 Reply

BC Berly Christopher Syncfusion Team September 23, 2021 09:58 AM UTC

Hi Sunil, 
  
Greetings from Syncfusion support. 
  
When you render the DatePicker component dynamically the value property get affected by other control interaction, we can clear the value property on the created event as mentioned in the below code example. 
  
<ejs-datepicker 
#date 
(created)="OnCreate($event)" 
[value]="value" 
></ejs-datepicker> 
public OnCreate() { 
    this.date.value = null; 
  } 
 
  
Please find the sample from the below link. 
  
Still facing issue, please share any issue reproducing sample or modify the attached sample with the reported issue that will help us to check and proceed further from our end. 
  
Regards, 
Berly B.C 


Loader.
Up arrow icon