mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-19 04:49:37 +02:00
feat: Update Visit model to use DateTimeField for start and end dates, and enhance AdventureModal with datetime-local inputs
This commit is contained in:
parent
6f720a154f
commit
9fd2a142cb
6 changed files with 152 additions and 35 deletions
|
@ -338,6 +338,12 @@ export let LODGING_TYPES_ICONS = {
|
|||
other: '❓'
|
||||
};
|
||||
|
||||
// Helper to check if a given date string represents midnight (all-day)
|
||||
export function isAllDay(dateStr: string | string[]) {
|
||||
// Checks for the pattern "T00:00:00.000Z"
|
||||
return dateStr.includes('T00:00:00Z') || dateStr.includes('T00:00:00.000Z');
|
||||
}
|
||||
|
||||
export function getAdventureTypeLabel(type: string) {
|
||||
// return the emoji ADVENTURE_TYPE_ICONS label for the given type if not found return ? emoji
|
||||
if (type in ADVENTURE_TYPE_ICONS) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue