Skip to content

Commit

Permalink
[Obsidian] Various bug fixes (#16608)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBatdorf authored Jan 26, 2025
1 parent 51ee0c9 commit 279384c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions extensions/obsidian/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Obsidian Changelog

## [Bug fixes] - 2024-12-03
- Fixes locale bug on Append Task command
- Fixes issue where tags were being converted to lowercase

## [Task Creation Date] - 2024-12-03
- Tasks added now log the creation date.

Expand Down
3 changes: 2 additions & 1 deletion extensions/obsidian/src/appendTaskCommand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ export default function AppendTask(props: { arguments: appendTaskArgs }) {

const tag = noteTag ? noteTag + " " : "";

const creationDateString = creationDate ? " ➕ " + new Date().toISOString().split("T")[0] : "";
// en-CA uses the same format as the iso string without the time ex: 2025-09-25
const creationDateString = creationDate ? " ➕ " + new Date().toLocaleDateString("en-CA") : "";

const selectedVault = vaultName && vaults.find((vault) => vault.name === vaultName);
// If there's a configured vault or only one vault, use that
Expand Down
2 changes: 1 addition & 1 deletion extensions/obsidian/src/components/CreateNoteForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function CreateNoteForm(props: { vault: Vault; showTitle: boolean }) {
/>
<Form.TagPicker id="tags" title="Tags" defaultValue={prefTag ? [prefTag] : []}>
{parseTags()?.map((tag) => (
<Form.TagPicker.Item value={tag.name.toLowerCase()} title={tag.name} key={tag.key} />
<Form.TagPicker.Item value={tag.name} title={tag.name} key={tag.key} />
))}
</Form.TagPicker>
<Form.TextArea
Expand Down

0 comments on commit 279384c

Please sign in to comment.