Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I set the value to null, I get an error #2774

Closed
3 tasks done
chrisskalog opened this issue Mar 15, 2023 · 3 comments · Fixed by #2780
Closed
3 tasks done

When I set the value to null, I get an error #2774

chrisskalog opened this issue Mar 15, 2023 · 3 comments · Fixed by #2780

Comments

@chrisskalog
Copy link

Prerequisites

Describe the issue

I use this method to set the date to null
dates.setFromInput("", 0);

This was working on the previous version, now I get an exception

StackBlitz fork

https://stackblitz.com/edit/tempus-dominus-v6-simple-setup-f1s37g?file=index.js,index.html

What operating system(s) are you seeing the problem on?

Windows, Android

What browser(s) are you seeing the problem on?

Chrome

What version of are you using? You can find this information from the sample StackBlitz.

6

What your browser's locale? You can find this information from the sample StackBlitz.

el

@chrisskalog chrisskalog added State: Triage Tickets that need to be triaged. Type: Bug labels Mar 15, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Tempus Dominus Mar 15, 2023
@Eonasdan Eonasdan added Area: TypeScript Priority: High and removed State: Triage Tickets that need to be triaged. labels Mar 16, 2023
@grassick
Copy link

This is causing some crashes in our production app. I get it from click events also, but cannot reproduce it myself:

Stack trace

src/js/dates.ts:208
src/js/actions.ts:140
src/js/actions.ts:31
src/js/utilities/event-emitter.ts:21
src/js/display/index.ts:801

Code in dates.ts:

   // case of calling setValue(null)
    if (!target) {
      this._setValueNull(isClear, index, oldDate);
    }

    index = index || 0;
    target = target.clone;

Shouldn't it return if target is null, rather than continue to target.clone?

grassick added a commit to grassick/tempus-dominus that referenced this issue Mar 21, 2023
Eonasdan added a commit that referenced this issue Mar 21, 2023
@Eonasdan Eonasdan mentioned this issue Mar 21, 2023
Eonasdan added a commit that referenced this issue Mar 21, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Tempus Dominus Mar 21, 2023
@Eonasdan
Copy link
Owner

Hi please check the v6.4.4 release.

@grassick
Copy link

Thanks! I really appreciate your fast work on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants