@ornikar/kitt-universal 9.46.1 → 9.46.2
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/dist/definitions/forms/DatePicker/reducers/keyboardDatePickerReducer.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +8 -3
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +8 -3
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +8 -3
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +8 -3
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +8 -3
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.js +8 -3
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -2679,6 +2679,11 @@ function getYearInInterval(value, minDate, maxDate) {
|
|
|
2679
2679
|
return value !== undefined ? Math.max(minValue, Math.min(maxValue, value)) : value;
|
|
2680
2680
|
}
|
|
2681
2681
|
|
|
2682
|
+
function getValueToDisplayedString(value) {
|
|
2683
|
+
// We exclude the undefined value since 0 is a valid number
|
|
2684
|
+
if (value === undefined) return '';
|
|
2685
|
+
return value.toString();
|
|
2686
|
+
}
|
|
2682
2687
|
var keyboardDatePickerReducer = function (state, action) {
|
|
2683
2688
|
switch (action.type) {
|
|
2684
2689
|
case 'day-change':
|
|
@@ -2686,7 +2691,7 @@ var keyboardDatePickerReducer = function (state, action) {
|
|
|
2686
2691
|
var nextDay = action.nextDay;
|
|
2687
2692
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
2688
2693
|
currentDay: nextDay,
|
|
2689
|
-
displayedDay: nextDay
|
|
2694
|
+
displayedDay: getValueToDisplayedString(nextDay)
|
|
2690
2695
|
});
|
|
2691
2696
|
}
|
|
2692
2697
|
case 'month-change':
|
|
@@ -2694,7 +2699,7 @@ var keyboardDatePickerReducer = function (state, action) {
|
|
|
2694
2699
|
var nextMonth = action.nextMonth;
|
|
2695
2700
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
2696
2701
|
currentMonth: nextMonth,
|
|
2697
|
-
displayedMonth: nextMonth
|
|
2702
|
+
displayedMonth: getValueToDisplayedString(nextMonth)
|
|
2698
2703
|
});
|
|
2699
2704
|
}
|
|
2700
2705
|
case 'year-change':
|
|
@@ -2702,7 +2707,7 @@ var keyboardDatePickerReducer = function (state, action) {
|
|
|
2702
2707
|
var nextYear = action.nextYear;
|
|
2703
2708
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
2704
2709
|
currentYear: nextYear,
|
|
2705
|
-
displayedYear: nextYear
|
|
2710
|
+
displayedYear: getValueToDisplayedString(nextYear)
|
|
2706
2711
|
});
|
|
2707
2712
|
}
|
|
2708
2713
|
case 'day-blur':
|