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

Option or global config to clear input on error.td occured #2926

Open
4 tasks done
itajackass opened this issue Jul 12, 2024 · 0 comments
Open
4 tasks done

Option or global config to clear input on error.td occured #2926

itajackass opened this issue Jul 12, 2024 · 0 comments
Labels
State: Triage Tickets that need to be triaged. Type: Bug

Comments

@itajackass
Copy link

itajackass commented Jul 12, 2024

Prerequisites

  • I have searched for duplicate or closed issues.
  • I have validated my setup against the latest version on StackBlitz.
  • I have read the contributing guidelines.
  • I understand that only sponsored issues will be worked on and that if I wish to sponsor an issue, I will contact the owner FIRST.

Describe the issue

Hi, i'd like to clear the input if a "no complete" date is inserted or in general on error trigger... for example if I manually insert "12" instead "12/12/2024", i want the input field clear byself.
Actually i need to add to all my pickers (in every page of my webapp - about 100 pickers :( ... ) this piece of code (see example provided):

...
datepicker.subscribe("error.td", (e) => {
    datepicker.clear();
});

Is there an option to automatically do it?
For example:

clearOnError: true

Or Maybe a global configuration I can create in a common.js file, to write 1 times instead 100+ times (for every picker i have)? Because in every page of my webapp there are multiple pickers so each has his own different name like: contractDatePicker, InvoiceDatePicker, expireDatePicker.....

Thanks

StackBlitz fork

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

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

Windows, macOS, Android, iOS, Linux

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

Firefox

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

6.9.4

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

it

@itajackass itajackass added State: Triage Tickets that need to be triaged. Type: Bug labels Jul 12, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Tempus Dominus Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
State: Triage Tickets that need to be triaged. Type: Bug
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant