mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
feat(ui): заменить все нативные date-инпуты на DateField
Тёмный DateField теперь везде, где был браузерный <input type="date">: фильтр периода в Трафике, диапазон дат в Платежах и Аудит-логе, срок действия промокода. Единый вид во всём кабинете. (datetime-local не трогал — там нужно ещё и время.)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { CalendarIcon, XIcon } from '../TrafficIcons';
|
||||
import { DateField } from '../../../DateField';
|
||||
|
||||
// ──────────────────────────────────────────────────────────────────
|
||||
// PeriodSelector — switches between fixed period tabs (1/3/7/14/30
|
||||
@@ -44,22 +45,18 @@ export function PeriodSelector({
|
||||
<div className="flex items-center gap-2">
|
||||
<CalendarIcon className="h-4 w-4" />
|
||||
<span className="text-xs text-dark-400">{t('admin.trafficUsage.dateFrom')}</span>
|
||||
<input
|
||||
type="date"
|
||||
<DateField
|
||||
value={customStart}
|
||||
min={minDate}
|
||||
max={customEnd || today}
|
||||
onChange={(e) => onCustomStartChange(e.target.value)}
|
||||
className="rounded-lg border border-dark-700 bg-dark-800 px-2 py-1 text-xs text-dark-200 focus:border-dark-600 focus:outline-none"
|
||||
onChange={onCustomStartChange}
|
||||
/>
|
||||
<span className="text-xs text-dark-400">{t('admin.trafficUsage.dateTo')}</span>
|
||||
<input
|
||||
type="date"
|
||||
<DateField
|
||||
value={customEnd}
|
||||
min={customStart || minDate}
|
||||
max={today}
|
||||
onChange={(e) => onCustomEndChange(e.target.value)}
|
||||
className="rounded-lg border border-dark-700 bg-dark-800 px-2 py-1 text-xs text-dark-200 focus:border-dark-600 focus:outline-none"
|
||||
onChange={onCustomEndChange}
|
||||
/>
|
||||
<button
|
||||
onClick={onToggleDateMode}
|
||||
|
||||
Reference in New Issue
Block a user