From 5f75f4ab3188675e176e6549c9441c977d4ffe5a Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Mon, 20 Mar 2023 23:37:29 +0530 Subject: [PATCH] chore: enabled AdvancedFormat dayjs plugin for note title custom format --- .../Components/ContentListView/Header/NewNotePreferences.tsx | 2 ++ .../src/javascripts/Controllers/ItemList/ItemListController.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/web/src/javascripts/Components/ContentListView/Header/NewNotePreferences.tsx b/packages/web/src/javascripts/Components/ContentListView/Header/NewNotePreferences.tsx index d5b8fc8ea..332eca016 100644 --- a/packages/web/src/javascripts/Components/ContentListView/Header/NewNotePreferences.tsx +++ b/packages/web/src/javascripts/Components/ContentListView/Header/NewNotePreferences.tsx @@ -17,6 +17,8 @@ import { WebApplication } from '@/Application/Application' import { AnyTag } from '@/Controllers/Navigation/AnyTagType' import { PreferenceMode } from './PreferenceMode' import dayjs from 'dayjs' +import dayjsAdvancedFormat from 'dayjs/plugin/advancedFormat' +dayjs.extend(dayjsAdvancedFormat) import { EditorOption, getDropdownItemsForAllEditors } from '@/Utils/DropdownItemsForEditors' import { classNames } from '@standardnotes/utils' import { NoteTitleFormatOptions } from './NoteTitleFormatOptions' diff --git a/packages/web/src/javascripts/Controllers/ItemList/ItemListController.ts b/packages/web/src/javascripts/Controllers/ItemList/ItemListController.ts index 5aaaf2858..2972d159c 100644 --- a/packages/web/src/javascripts/Controllers/ItemList/ItemListController.ts +++ b/packages/web/src/javascripts/Controllers/ItemList/ItemListController.ts @@ -34,6 +34,8 @@ import { NotesController } from '../NotesController/NotesController' import { formatDateAndTimeForNote } from '@/Utils/DateUtils' import { PrefDefaults } from '@/Constants/PrefDefaults' import dayjs from 'dayjs' +import dayjsAdvancedFormat from 'dayjs/plugin/advancedFormat' +dayjs.extend(dayjsAdvancedFormat) import { LinkingController } from '../LinkingController' import { AbstractViewController } from '../Abstract/AbstractViewController' import { log, LoggingDomain } from '@/Logging'