Unable to change the default error message for the TimePicker

Hi Support:

I need to display a custom error message for the time picker. I tried this without success:

 <ej-time-picker id="_Time" name="_Time" interval="5"
                            validation-rules='new Dictionary<string, object>() { { "required",true} }'
                            validation-message='new Dictionary<string, object>() { { "required","Required!"} }'
                            >

            </ej-time-picker>

When I run the view, the error message that is displayed is: "This field is required."

As you can see, we want to display an exclammation character instead.

Thanks

David

3 Replies

PK Prem Kumar Madhan Raj Syncfusion Team May 22, 2017 11:54 AM UTC

Hi David,   
Thanks for contacting Syncfusion support.  
We have analyzed your query “to change default error message of timepicker”.    
Since the “validation-message” API of timepicker has been deprecated and replaced by “validation-messages” from “2017 volume 2 release”, please make use of “validation-messages” instead of “validation-message” to change the default error message.    
Please refer the below code block to change the default error message of the timepicker.   
    <ej-time-picker id="_Time" name="_Time" interval="5" validation-rules='new Dictionary<string, object>() { { "required",true} }' validation-messages='new Dictionary<string, object>() { { "required","Required!"} }'> 
    </ej-time-picker> 
For further details about features or breaking changes, please refer the release notes for volume 2 release.   
Regards,   
Prem Kumar. M   



DS dsapo May 22, 2017 05:21 PM UTC

Thanks Kumar for your help to solve this.

David




PK Prem Kumar Madhan Raj Syncfusion Team May 23, 2017 09:50 AM UTC

Hi David, 
 
We are glad to hear that the issue has been fixed. 

Please let us know if you need further assistance.  

Regards, 

Prem Kumar.M 


Loader.
Up arrow icon