<wj-input-date> transforms date differently each time

Posted by: harsh03.gupta on 20 January 2020, 11:12 pm EST

  • Posted 20 January 2020, 11:12 pm EST

    Hi Team,

    To replicate this issue, I have created a sample demo https://stackblitz.com/edit/ckkyne-6tnexz?file=src/app/app.component.html.

    Try to type this →

    Date Input Output(tab out)

    9-6-2022 09-Jun-2022

    9-6-2022 06-Sep-2022

    9-6-2022 09-Jun-2022

    If you noticed, the component transforms date each time differently.

    Also I noticed, it’s more of a format issue. Currently I’m providing format as ‘dd-MMM-yyyy’ but if I change it to ‘MMM-dd-yyyy’, component works fine(you can also try the same with stackblitz example).

    Regards,

    Harsh

  • Posted 21 January 2020, 12:22 am EST - Updated 3 October 2022, 9:11 am EST

  • Posted 22 January 2020, 12:15 am EST

    Hi Harsh,

    In this sample, you have added keyup and blur event listeners. If I remove these listeners, the issue does not exist. Is there a particular reason of using these event handlers?

    Regards,

    Ashwin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels