feat(frontend): race form, start time selects, calendar views, day page
Some checks failed
CI / build-and-test (pull_request) Has been cancelled
Some checks failed
CI / build-and-test (pull_request) Has been cancelled
- Hide org schedule fields when editing a past race; isRaceDateInPast helper - StartTimeSelects (HH:mm:ss) and optional ?date= prefill on new race - Full-card link to edit for races needing result entry; shadow token - List/calendar toggle (sessionStorage); year grid and month focus views - Date hover popover and /races/day/:ymd page with Add button - Docs plan-korrektirovok-starty.md and startTime API note; client 0.4.0 Made-with: Cursor
This commit is contained in:
@@ -12,6 +12,13 @@ export function parseRaceDate(date: string): Date {
|
||||
return parsed;
|
||||
}
|
||||
|
||||
/** Дата старта (календарный день) строго раньше сегодняшней полуночи по локали. */
|
||||
export function isRaceDateInPast(raceDate: string, now: Date = new Date()): boolean {
|
||||
const today = new Date(now);
|
||||
today.setHours(0, 0, 0, 0);
|
||||
return parseRaceDate(raceDate).getTime() < today.getTime();
|
||||
}
|
||||
|
||||
export function parseFinishTimeToSeconds(value: string | null): number | null {
|
||||
if (!value) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user