vueless 0.0.588 → 0.0.589
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ui.form-calendar/UCalendar.vue +22 -0
- package/web-types.json +1 -1
package/package.json
CHANGED
|
@@ -559,6 +559,8 @@ function onClickSubmit() {
|
|
|
559
559
|
emit("submit");
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
+
let timeInputCount = 0;
|
|
563
|
+
|
|
562
564
|
function onClickTimeInput(event: MouseEvent) {
|
|
563
565
|
const input = event.target as HTMLInputElement;
|
|
564
566
|
|
|
@@ -568,6 +570,8 @@ function onClickTimeInput(event: MouseEvent) {
|
|
|
568
570
|
function onFocusTimeInput(event: FocusEvent) {
|
|
569
571
|
const input = event.target as HTMLInputElement;
|
|
570
572
|
|
|
573
|
+
timeInputCount = 0;
|
|
574
|
+
|
|
571
575
|
selectTimeInput(input);
|
|
572
576
|
}
|
|
573
577
|
|
|
@@ -578,6 +582,8 @@ function selectTimeInput(input: HTMLInputElement) {
|
|
|
578
582
|
}
|
|
579
583
|
|
|
580
584
|
function onTimeInput(event: InputEvent, type: InputType) {
|
|
585
|
+
timeInputCount += 1;
|
|
586
|
+
|
|
581
587
|
const input = event.target as HTMLInputElement;
|
|
582
588
|
const value = input.value;
|
|
583
589
|
const numericValue = Number(value);
|
|
@@ -666,6 +672,22 @@ function onTimeInput(event: InputEvent, type: InputType) {
|
|
|
666
672
|
}
|
|
667
673
|
|
|
668
674
|
input.value = String(numericValue).padStart(2, "0");
|
|
675
|
+
|
|
676
|
+
if (timeInputCount >= 2) {
|
|
677
|
+
if (isHours && minutesRef.value) {
|
|
678
|
+
minutesRef.value.focus();
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
if (isMinutes && secondsRef.value) {
|
|
682
|
+
secondsRef.value.focus();
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
if (isSeconds && okButton.value) {
|
|
686
|
+
okButton.value.buttonRef?.focus();
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
timeInputCount = 0;
|
|
690
|
+
}
|
|
669
691
|
}
|
|
670
692
|
|
|
671
693
|
defineExpose({
|