Add ability to use 12 hour time in input time filter (#13961)

This commit is contained in:
Josh Hawkins
2024-09-25 12:15:08 -05:00
committed by GitHub
parent 45aceea53b
commit be3e1831d4
3 changed files with 91 additions and 44 deletions

View File

@@ -121,7 +121,10 @@ export default function SearchView({
zones: Object.values(allZones || {}),
sub_labels: allSubLabels,
search_type: ["thumbnail", "description"] as SearchSource[],
time_range: ["00:00,24:00"],
time_range:
config?.ui.time_format == "24hour"
? ["00:00-23:59"]
: ["12:00AM-11:59PM"],
before: [formatDateToLocaleString()],
after: [formatDateToLocaleString(-5)],
}),