+
{
+ // Ограничиваем ввод цифрами и точками; авто-вставляем точки после dd и mm
+ let v = e.target.value.replace(/[^\d.]/g, '')
+ // Авто-точки: после 2-й и 5-й цифры
+ const digits = v.replace(/\./g, '')
+ if (digits.length >= 5) v = `${digits.slice(0, 2)}.${digits.slice(2, 4)}.${digits.slice(4, 8)}`
+ else if (digits.length >= 3) v = `${digits.slice(0, 2)}.${digits.slice(2, 4)}`
+ else v = digits
+ setDraft(v)
+ }}
+ onBlur={() => commitDraft(draft)}
+ onFocus={(e) => e.currentTarget.select()}
+ className={inputClass}
+ />
+
+ {open && pos && createPortal(
+
+ {
+ if (!d) return
+ const iso = dateToIso(d)
+ onChange(iso)
+ setDraft(isoToDisplay(iso))
+ setOpen(false)
+ }}
+ classNames={{
+ caption_label: 'capitalize',
+ weekday: 'capitalize',
+ }}
+ />
+
,
+ document.body,
+ )}
+
+ )
+}
diff --git a/src/food-market.web/src/pages/SupplyEditPage.tsx b/src/food-market.web/src/pages/SupplyEditPage.tsx
index ad8ae2f..ee20c23 100644
--- a/src/food-market.web/src/pages/SupplyEditPage.tsx
+++ b/src/food-market.web/src/pages/SupplyEditPage.tsx
@@ -4,7 +4,8 @@ import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query'
import { ArrowLeft, Plus, Trash2, Save, CheckCircle } from 'lucide-react'
import { api } from '@/lib/api'
import { Button } from '@/components/Button'
-import { Field, TextInput, TextArea, Select, Checkbox, MoneyInput, NumberInput } from '@/components/Field'
+import { Field, TextArea, Select, Checkbox, MoneyInput, NumberInput } from '@/components/Field'
+import { DateField } from '@/components/DateField'
import { ProductPicker } from '@/components/ProductPicker'
import { SupplyLineQuickAdd, type AddedProduct } from '@/components/SupplyLineQuickAdd'
import { useStores, useCurrencies, useSuppliers, usePriceTypes } from '@/lib/useLookups'
@@ -299,8 +300,8 @@ export function SupplyEditPage() {