@ornikar/kitt-universal 7.0.1 → 7.0.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.
@@ -3897,6 +3897,12 @@ function ModalDateTimePicker(_ref2) {
3897
3897
  }
3898
3898
 
3899
3899
  var timePickerPlaceholder = '--:--';
3900
+ var formatNumberToTimeString = function (time) {
3901
+ return "".concat(String(time).padStart(2, '0'));
3902
+ };
3903
+ var formatDateToTimeString = function (date) {
3904
+ return "".concat(formatNumberToTimeString(date.getHours()), ":").concat(formatNumberToTimeString(date.getMinutes()));
3905
+ };
3900
3906
  var useTimePicker = function (value, onChange, onBlur, disabled, defaultValue) {
3901
3907
  var _useState = useState(false),
3902
3908
  _useState2 = _slicedToArray(_useState, 2),
@@ -3909,10 +3915,7 @@ var useTimePicker = function (value, onChange, onBlur, disabled, defaultValue) {
3909
3915
  }, []);
3910
3916
  var defaultDate = defaultValue || todayAtNoon;
3911
3917
  var dateTimePickerValue = value || defaultDate;
3912
- var displayedValue = value === null ? timePickerPlaceholder : Intl.DateTimeFormat('fr-FR', {
3913
- minute: 'numeric',
3914
- hour: 'numeric'
3915
- }).format(dateTimePickerValue);
3918
+ var displayedValue = value === null ? timePickerPlaceholder : formatDateToTimeString(dateTimePickerValue);
3916
3919
  var timePickerState = isTimePickerModalVisible ? 'focus' : 'default';
3917
3920
  return {
3918
3921
  dateTimePickerValue: dateTimePickerValue,