How can we make the DateTimePickerAdv/SfDateTimeEdit control to accept placeholder 0 for the month and day values in the format?

We would like to add a placeholder value 0 for the day and month fields in the d.M.yyyy format. For example, we would like to accept 0.12.2015 and 0.0.2015 in the datetimepicker control. Is this possible and if so, how do we add this customization?

Thank you in advance.

3 Replies

AI Anirudhan Iyyappan Syncfusion Team March 10, 2020 01:59 PM UTC

Hi Peregrino, 
 
Thanks for contacting Syncfusion support. 
 
In DateTimePickerAdv/SfDateTimeEdit control, It is not possible to input zero for month or day. Both controls work based on DateTime type. Please let us know the requirement you are trying to achieve.  

Regards, 
Anirudhan 



PE Peregrino March 10, 2020 05:53 PM UTC

Hi Anirudhan,

Thanks for your response. The requirement is to be able to input day and month only if they are available. So if they are not available, we would like to be able to enter 0 for each value.

Thanks,
Peregrino


AI Anirudhan Iyyappan Syncfusion Team March 11, 2020 02:18 PM UTC

Hi Peregrino, 

Thanks for the update. 

We hope that your requirement can be achieved by using custom DateTime Format. Using custom format, you can skip some fields from displaying. Please check the below UG Documentation for further references. 


Please note that Date and TimePicker will only accept valid values. You cannot have a value with moth or date as zero. If this is not your requirement, could you please elaborate your requirement using screenshot/video and scenario where such invalid values are used? Based on that we investigate on it.  

Regards, 
Anirudhan 


Loader.
Up arrow icon