bfg-common 1.4.261 → 1.4.262

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.
@@ -1,4 +1,4 @@
1
- import { isBefore, startOfDay } from 'date-fns'
1
+ import { isBefore, parseISO, startOfDay, subMinutes } from 'date-fns'
2
2
  import type {
3
3
  UI_I_Localization,
4
4
  UI_I_ArbitraryObject,
@@ -86,12 +86,13 @@ export const validateField = (
86
86
  }
87
87
  export const validateDate = (
88
88
  localization: UI_I_Localization,
89
- date: string
89
+ date: string,
90
+ _predefinedDate?: string
90
91
  ): string => {
91
92
  const currentDateTime = startOfDay(new Date())
92
- const selectedDate = startOfDay(new Date(date)) // Начало дня выбранной даты
93
+ const selectedDate = subMinutes(parseISO(date), 4) // Начало дня выбранной даты theValueLargeThanStartTime
93
94
 
94
95
  return isBefore(selectedDate, currentDateTime)
95
- ? localization.common.theValueLargeThanStartTime
96
+ ? localization.common.theValueTooSmall
96
97
  : ''
97
98
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.261",
4
+ "version": "1.4.262",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",