From 1fde4006bd549f346436945fe523d603afbd21e4 Mon Sep 17 00:00:00 2001 From: Jonathan Peterson Date: Thu, 21 Dec 2023 16:46:41 -0500 Subject: [PATCH] #2793 --- .github/ISSUE_TEMPLATE/bug_report.yml | 8 +++++--- .github/PULL_REQUEST_TEMPLATE | 2 -- README.md | 4 ++++ src/js/dates.ts | 19 ++++++++++++++----- src/js/utilities/errors.ts | 3 +-- 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 50f69db1c..049e636c4 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -5,8 +5,8 @@ labels: ["Type: Bug", "State: Triage"] body: - type: markdown attributes: - value: "Note: I am no longer taking feature requests. - Beginning in 2024, tickets will be paid support only. Please see [this discussion](https://github.com/Eonasdan/tempus-dominus/discussions/2694)." + value: "

Note: I am no longer taking feature requests. + Beginning in 2024, tickets will be paid support only. Please see [this discussion](https://github.com/Eonasdan/tempus-dominus/discussions/2694).

" - type: checkboxes attributes: label: Prerequisites @@ -18,6 +18,8 @@ body: required: true - label: I have read the [contributing guidelines](https://github.com/Eonasdan/tempus-dominus/blob/master/.github/CONTRIBUTING.md). required: true + - label: 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. + required: true - type: textarea id: what-happened attributes: @@ -32,7 +34,7 @@ body: id: reduced-test-case attributes: label: StackBlitz fork - description: "You MUST provide an StackBlitz fork of one of the following examples: [HTML](https://stackblitz.com/edit/tempus-dominus-v6-simple-setup), [Dev branch](https://stackblitz.com/edit/tempus-dominus-v6-next), [Typescript](https://stackblitz.com/edit/v6-typescript), [Using import](https://stackblitz.com/edit/tempus-dominus-v6-simple-setup-import), or [jQuery](https://stackblitz.com/edit/tempus-dominus-v6-simple-jquery-setup)." + description: "You MUST provide an StackBlitz fork of one of the following examples: [HTML](https://stackblitz.com/edit/tempus-dominus-v6-simple-setup), [Typescript](https://stackblitz.com/edit/v6-typescript), [Using import](https://stackblitz.com/edit/tempus-dominus-v6-simple-setup-import), or [jQuery](https://stackblitz.com/edit/tempus-dominus-v6-simple-jquery-setup)." validations: required: true - type: dropdown diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE index 4210a9418..a63d48724 100644 --- a/.github/PULL_REQUEST_TEMPLATE +++ b/.github/PULL_REQUEST_TEMPLATE @@ -1,10 +1,8 @@ PRs relating to the v4 will be closed and locked. * **Please check if the PR fulfills these requirements** -- [ ] The PR is against the `development` branch - [ ] Tests for the changes have been added (for bug fixes / features) - [ ] Docs have been added / updated (for bug fixes / features) -- [ ] Does NOT modify files under the "dist" folder. * **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...). If this is a fix, please tag a bug. diff --git a/README.md b/README.md index 80f459392..b89de6f6e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/R6R53OEFF) +# Paid support only + +Please note that I'm moving on to other projects. New issues will need to be sponsored. This can be done via BountySource or my other donation links. Please reach out to me first so we can discuss the terms. Thank you for your years of support. + # Tempus Dominus Date/Time Picker v6.7.19 Tempus Dominus is a powerful and robust date time picker for javascript. Version 6 is another major rewrite over the previous version. V6 is written with modern browsers in mind and is written in typescript. Bootstrap, momentjs and jQuery are no longer required dependencies. Popper2 is all that is required for the picker to position correctly. If you still require jQuery (seriously, you should move off that asap) there's a jQuery provider that wraps the native js functions. diff --git a/src/js/dates.ts b/src/js/dates.ts index cf2fe901f..5a96ec521 100644 --- a/src/js/dates.ts +++ b/src/js/dates.ts @@ -57,11 +57,20 @@ export default class Dates { */ //eslint-disable-next-line @typescript-eslint/no-explicit-any parseInput(value: any): DateTime { - return OptionConverter.dateConversion( - value, - 'input', - this.optionsStore.options.localization - ); + try { + return OptionConverter.dateConversion( + value, + 'input', + this.optionsStore.options.localization + ); + } catch (e) { + this._eventEmitters.triggerEvent.emit({ + type: Namespace.events.error, + reason: Namespace.errorMessages.failedToSetInvalidDate, + date: value, + } as FailEvent); + return undefined; + } } /** diff --git a/src/js/utilities/errors.ts b/src/js/utilities/errors.ts index ddb5fafe9..d4682a126 100644 --- a/src/js/utilities/errors.ts +++ b/src/js/utilities/errors.ts @@ -139,8 +139,7 @@ export class ErrorMessages { customDateFormatError(message?: string) { const error = new TdError(`${this.base} Custom Date Format: ${message}`); error.code = 9; - //throw error; - console.warn(error); + throw error; } /**