Skip to content

Conversation

Copy link

Copilot AI commented Nov 14, 2025

Calendar views ignored user-configured time ranges in Settings → Appearance → Calendar Time Settings, always using hardcoded 06:00-22:00.

Changes

Template Generation (src/templates/defaultBasesFiles.ts)

  • generateBasesFileTemplate(): Use settings.calendarViewSettings.slotMinTime/slotMaxTime instead of hardcoded values
  • DEFAULT_BASES_FILES fallback: Use correct defaults (00:00-24:00) matching settings/defaults.ts
// Before
slotMinTime: "06:00:00"
slotMaxTime: "22:00:00"

// After
slotMinTime: "${settings.calendarViewSettings.slotMinTime}"
slotMaxTime: "${settings.calendarViewSettings.slotMaxTime}"

Tests (tests/unit/templates/defaultBasesFiles.test.ts)

  • Verify user-configured times are applied to generated templates
  • Verify default times (00:00-24:00) are used when no custom values exist
  • Verify hardcoded values (06:00-22:00) are not present in generated templates
Original prompt

i cannot change the calendar times in the settings from 0-24h , instead it uses the hardcoded 06:00 to 21:00


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 14, 2025 17:16
…ardcoded 06:00-22:00

Co-authored-by: gregor202 <6792983+gregor202@users.noreply.github.com>
Co-authored-by: gregor202 <6792983+gregor202@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix hardcoded calendar times in settings Fix calendar time settings to use user configuration instead of hardcoded 06:00-22:00 Nov 14, 2025
Copilot AI requested a review from gregor202 November 14, 2025 17:24
@gregor202
Copy link
Owner

@copilot so it is fixed now? what do i do now? i just forked this to my own account and want to test

Copy link
Author

Copilot AI commented Nov 14, 2025

@copilot so it is fixed now? what do i do now? i just forked this to my own account and want to test

Yes, the fix is complete! Here's how to test it in your forked repository:

  1. Build the plugin: Run npm install then npm run build
  2. Copy to Obsidian: Copy main.js, manifest.json, and styles.css to your vault's .obsidian/plugins/tasknotes/ directory
  3. Test the fix:
    • Open Settings → TaskNotes → Appearance → Calendar Time Settings
    • Change "Start Time" and "End Time" (e.g., set to 08:00 and 20:00)
    • Create a new calendar view or delete your existing .base calendar file in TaskNotes/Views/ folder
    • Open the calendar view - it should now respect your configured times instead of using 06:00-22:00

The changes ensure new calendar views use your settings. Existing calendar .base files won't update automatically - you'll need to recreate them or manually edit the slotMinTime and slotMaxTime values in the files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants