feat: Update Visit model to use DateTimeField for start and end dates, and enhance AdventureModal with datetime-local inputs
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user