Files
tp-date-input/package.json
T
pk b32fd403ec fix(tp-date-input): validate correctly when change event hasn't fired yet
validate() relied on this.value, which is only set by _inputChanged on
the change event. Submitting via Enter while focus is still in an input
field skips that event, leaving this.value undefined and causing valid
dates to fail validation.

Introduce _valueFromInputs() as the single parsing source: it reads the
three sub-inputs directly and returns a UTC-midnight DateTime.
validate()
now falls back to it when this.value is not set. _inputChanged is
refactored to call _valueFromInputs() as well, removing the duplicated
format-mapping logic.
2026-06-10 22:42:27 +02:00

20 lines
422 B
JSON

{
"name": "@tp/tp-date-input",
"version": "2.1.2",
"description": "",
"main": "tp-date-input.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://gitea.codeblob.work/tp-elements/tp-date-input.git"
},
"author": "trading_peter",
"license": "Apache-2.0",
"dependencies": {
"luxon": "^3.0.0",
"lit": "^3.0.0"
}
}