mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-22 18:29:34 +00:00
fix: datetime format in main page news list
This commit is contained in:
1 parent
9d841cd606
commit
c7e4de7df2
2 files changed
+10
-6
No files matched your search
@@ -8,13 +8,17 @@ interface ParsedNewsDateSchema extends Omit<NewsDateSchema, "start_date" | "end_
|
||||
}
|
||||
|
||||
document.addEventListener("alpine:init", () => {
|
||||
Alpine.data("upcomingNewsLoader", (startDate: Date) => ({
|
||||
Alpine.data("upcomingNewsLoader", (startDate: Date, locale: string) => ({
|
||||
startDate: startDate,
|
||||
currentPage: 1,
|
||||
pageSize: 6,
|
||||
hasNext: true,
|
||||
loading: false,
|
||||
newsDates: [] as NewsDateSchema[],
|
||||
dateFormat: new Intl.DateTimeFormat(locale, {
|
||||
dateStyle: "medium",
|
||||
timeStyle: "short",
|
||||
}),
|
||||
|
||||
async loadMore() {
|
||||
this.loading = true;
|
||||
|
||||
Reference in new issue
Block a user