Onchange native event does not trigger after click the clear button

Hi!
I have been working with the DatePicker component and since there is no mask in this component and I want to be able to type dates without format I mean I can type 10081994 and this will be valid cause I am getting this value in onchange native event and parsing it to a valid DateTime. (I attach the project sample).
It works but I notice when I clear the input with the clear button in the DatePicker and later enter a flat string (10081994) the onchange event is not fired so the flat string is not parsed to a DateTime value. This happens in 19.1.0.59 version if you downgrade the version to 18.2.0.55 it works, I did not check the other versions because I realized this for a casualty cause I have an old project with the 18.2.0.55 version but in my current project, I am with 19.1.0.59 version and is happening in the last version as well.

Attached two gif's with the different versions and the sample project.

I appreciate your answer!

Attachment: Desktop_bb0d75d6.rar

11 Replies 1 reply marked as answer

AS Adriana Selena Tito Ilasaca May 27, 2021 09:13 PM UTC

Syncfusion! Are there any updates about this thread?


PM Ponmani Murugaiyan Syncfusion Team May 28, 2021 12:52 AM UTC

Hi Adriana, 

Thanks for contacting Syncfusion support. 

We able to replicate the reported issue in our end. We will share the timeline for the fix and feedback for this issue in 1 business days (may 28, 2021). Until then we suggest you to use the below work-around solution to meet your requirement. 

<SfDatePicker TValue="DateTime?" @onblur="@focusOut" @oninput="@inputHandler" @bind-Value='@DateValue' Min='@MinDate' Max='@MaxDate' Format="MM/dd/yyyy" ShowClearButton="true"> 
</SfDatePicker> 
 
 
@code { 
    public DateTime? DateValue { get; set; } = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 10); 
    public DateTime MinDate { get; set; } = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 05); 
    public DateTime MaxDate { get; set; } = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 27); 
    private string inputValue { get; set; } 
    private void inputHandler(ChangeEventArgs args) 
    { 
        inputValue = (string)args.Value; 
    } 
    private void focusOut() 
    { 
        DateTime parsedDate; 
        if (!string.IsNullOrEmpty(inputValue)) 
        { 
            var result = DateTime.TryParseExact(inputValue.ToString(), "MMddyyyy", new CultureInfo("en-US"), 
                                    DateTimeStyles.None, out parsedDate); 
            if (result) 
            { 
                DateValue = parsedDate; 
            } 
        } 
    }  
} 


Regards, 
Ponmani M 
 



PM Ponmani Murugaiyan Syncfusion Team May 28, 2021 02:56 PM UTC

Hi Adriana, 

Thanks for your patience. 

We have considered the reported issue “Native onchange event in DatePicker component is not triggered after click the clear icon” as bug in our end. The fix will be included in the upcoming patch release which is scheduled on June 02, 2021. You can track the status using the below feedback. 


Until then, we suggest you to use the previously suggested work around solution to meet your requirement. 

Regards, 
Ponmani M 



PM Ponmani Murugaiyan Syncfusion Team June 3, 2021 04:00 AM UTC

Hi Adriana, 

Sorry for the inconvenience caused. 

We will update further details in 2 business days (June 07, 2021). Until then, we suggest you to use the previously provided workaround solution to meet your requirement. 

Regards, 
Ponmani M 



PM Ponmani Murugaiyan Syncfusion Team June 7, 2021 12:43 PM UTC

Hi Adriana, 

Sorry for the inconvenience caused. 

We will update further details in 2 business days (June 09, 2021). We appreciate your patience until then. 

Regards, 
Ponmani M 



PM Ponmani Murugaiyan Syncfusion Team June 9, 2021 01:36 PM UTC

Hi Adriana, 
 
Sorry for the inconvenience caused. 
 
We are facing complexity while resolving the reported issue. We will include in upcoming patch release scheduled on mid of June 2021. Until then, we suggest you to use the previously suggested solution to meet your requirement. 
 
We appreciate your patience until then. 
 
Regards, 
Ponmani M 



AS Adriana Selena Tito Ilasaca June 29, 2021 07:05 PM UTC

Thanks for the answer I have been following the reported bug, there is no exact date when the fix of this bug will be released.
Do you have a date or release version?
I will appreciate your answer



PM Ponmani Murugaiyan Syncfusion Team June 30, 2021 02:50 PM UTC

Hi Adriana, 

Thanks for your patience. 

We are glad to announce that fix for the issue "Native onchange event in DatePicker component is not triggered after click the clear icon" has been rolled out in our weekly patch release. We request you to update the Syncfusion Nuget to "19.1.69" or latest version to get rid of this issue. 

Please find the sample from the below link. 


Please let us know if you need any further assistance on this. 

Regards, 
Ponmani M 



AS Adriana Selena Tito Ilasaca July 9, 2021 07:18 PM UTC

Hi there.

In the "19.1.69" version the bug is fixed, but updating the version to "19.2.44" The bug is still present. You can reproduce it by updating the demo project you attached in your answer updating it to "19.2.44"
The issue is when you cleared the date with x button onChange is fired but when you enter a new value onChange is not fired so the value is not parsed.



PM Ponmani Murugaiyan Syncfusion Team July 12, 2021 01:20 PM UTC

Hi Adriana, 

Sorry for the inconvenience caused. 

We able to replicate the reported issue in our end. We will include the fix in this weekly patch release scheduled on July 13, 2021. We appreciate your patience until then. 

Regards, 
Ponmani M 



PM Ponmani Murugaiyan Syncfusion Team July 13, 2021 10:15 AM UTC

Hi Adriana, 

Thanks for the patience. 

The fix for the reported issue “Native onchange event in DatePicker component is not triggered after click the clear icon” has been included in this weekly patch release. We request you to update the Syncfusion Nuget to "19.2.47" to get rid of this issue. 

Please find the sample and release notes from the below link. 



Please let us know if you need any further assistance on this. 

Regards, 
Ponmani M 


Marked as answer
Loader.
Up arrow icon