want to display message on date entry

Hi,
I want to display message if user enters date manually of different format without opening the datepicker. 
Also If I am entering the date like :
05-apr-2020, it is not taking it and automatically select 1 Apr 2020, i.e it is having definite pattern of first letter to be capital, I want to make user friendly to the end user. Please help

Thanks

3 Replies

SN Sevvandhi Nagulan Syncfusion Team January 13, 2021 09:33 AM UTC

Hi RakhiS, 


Greetings from Syncfusion support. 


Query 1: I want to display message if user enters date manually of different format without opening the datepicker.  
Also If I am entering the date like : 
 
 
 
We prepared the sample with custom validation using FormValidator. When you enter the date against the given format, then error message will appear stating that “Please type a date in the given format“. Please refer the below code, 
 
 
 
    ngOnInit() { 
        // custom validator function. 
        let customFn: (args: { [key: string]: string }) => boolean = (args: { 
          [key: string]: string; 
        }) => { 
          return this.ejDate.value ? true : false; 
        }; 
        let options: FormValidatorModel = { 
          rules: { 
            datepicker: { 
              required: [true"Value is required"] 
            } 
          }, 
          customPlacement: ( 
            inputElement: HTMLElement, 
            errorElement: HTMLElement 
          ) => { 
            inputElement.parentElement.parentElement.appendChild(errorElement); 
          } 
        }; 
        this.formObject = new FormValidator("#form-element", options); 
        this.formObject.addRules("datepicker", { 
          range: [customFn, "Please type a date in the given format"] 
        }); 
        this.formObject = new FormValidator("#form-element", options); 
      } 
 
 

Please find the sample below, 



Query 2:  05-apr-2020, it is not taking it and automatically select 1 Apr 2020, i.e it is having definite pattern of first letter to be capital, I want to make user friendly to the end user. Please help 

We have already logged the requested requirement as a feature at our end. This support will be included in any one of our upcoming releases. Please track the status of the reported issue from the below feedback. 



Regards, 
Sevvandhi N 



RA RakhiS February 22, 2021 08:05 AM UTC

Hi,
Is query 2 resolved, I mean is the feature included ?


SN Sevvandhi Nagulan Syncfusion Team February 23, 2021 06:44 AM UTC

Hi RakhiS, 


Currently there is no plan to include this feature in upcoming release. Also, we will implement the feature based on the priority and customer requested count.  To make it count, please cast your vote. We will prioritize the features based on the demands of each release. We will intimate you once road map has been prepared for this feature finalized in any one of our releases. 






Regards, 
Sevvandhi N 


Loader.
Up arrow icon