Auto fill prepopulate the year

Hi it seem we can't limit the input and display of the year to 2 digits. Can I some how populate just the year portion of the control so on page load the control will look like mm/dd/2018 or {current year}?


Thanks,

1 Reply

DL Deepa Loganathan Syncfusion Team October 10, 2018 04:18 PM UTC


Hi Donnelly, 
 
 
Thanks for contacting Syncfusion Support. 
 
 
Yes, you can customize the datepicker popup only to populate the year by using the start and depth properties of DatePicker and also, we can set the date format to display only the year value in the input element by using format property as given below. 
 
 
[index.html] 
 
<ejs-datepicker id="date" start="Year" depth="Year" value="System.DateTime.Today" format="yyyy"></ejs-datepicker> 
 
 
Also, follow the below links to know more about the EJ2 DatePicker in ASP.NET Core. 
 
 
 
 
 
 
Please let us know if you need any further assistance. 
 
 
Regards, 

Deepa L. 


Loader.
Up arrow icon