fix(booking): refresh date filter on calendar input

This commit is contained in:
Dana Medical Developer 2026-10-22 10:14:35 +00:00
parent da3b074c98
commit 64ee909b3e
2 changed files with 2 additions and 1 deletions

View File

@ -93,7 +93,7 @@ try {
await act(async () => root.render(null)); await act(async () => root.render(null));
await render(); await render();
await act(async () => Simulate.change(container.querySelector('input[type="date"]'), { target: { value: '2070-10-24' } })); await act(async () => Simulate.input(container.querySelector('input[type="date"]'), { target: { value: '2070-10-24' } }));
assert.deepEqual([...container.querySelector('select').options].map((option) => option.value), ['', '2'], 'Only doctors free on the selected date appear'); assert.deepEqual([...container.querySelector('select').options].map((option) => option.value), ['', '2'], 'Only doctors free on the selected date appear');
await chooseDoctor(2); await chooseDoctor(2);
await reply(pending.at(-1), [free('09:00'), { ...free('14:15'), start: '2070-10-24T14:15:00+03:00' }]); await reply(pending.at(-1), [free('09:00'), { ...free('14:15'), start: '2070-10-24T14:15:00+03:00' }]);

View File

@ -248,6 +248,7 @@ export default function LeadModal({ form = 'appointment', doctor, slot, service,
type="date" type="date"
min={todayKey()} min={todayKey()}
value={date} value={date}
onInput={changeDate}
onChange={changeDate} onChange={changeDate}
/> />
<span className="lead-modal__subtitle">Можно выбрать дату и увидеть только свободных в этот день врачей.</span> <span className="lead-modal__subtitle">Можно выбрать дату и увидеть только свободных в этот день врачей.</span>