obsidian-community / obsidian-full-calendar

Keep events and manage your calendar alongside all your other notes in your Obsidian Vault.
https://davish.github.io/obsidian-full-calendar/
MIT License
801 stars 108 forks source link

event missing in dataview calendar #440

Open vran-dev opened 1 year ago

vran-dev commented 1 year ago

hi, obsidian-full-calendar is amazing plugins, I use dataview to query data and rendering calendar, but i found the event is missing in someday

Steps to reproduce

---
area: []
status: DOING
priority: Let's GO
beginTime: 2023-04-10T15:31:00
endTime: 2023-04-15T15:31:00
createAt: 2023-04-16 15:31:00
tags: []
---
let projectFolder= '"01-Project"';
this.container.style.minHeight = "500px"; 
const { renderCalendar } = app.plugins.plugins["obsidian-full-calendar"]; 
let colors = ['#2f385e', '#4ca4f6', '#e2be19', '#e55359']
let events = dv.pages(projectFolder).map((item, index) => {
    console.log(index+", "+item);
    return {
        id: item.file.name,
        title: item.file.name,
        start: item.beginTime.ts,
        end: item.endTime.ts,
        color: colors[index%4],
        eventDisplay: 'background'
    }
});
console.log(events.values)
let calendar = renderCalendar(this.container, [events.array()]);

calendar.setOption('timeZone', 'local');
calendar.setOption('firstDay', 1);
calendar.setOption('selectable', true);
calendar.setOption('showNonCurrentDates', true);
calendar.render();
window.setTimeout(_ => {
    calendar.changeView('dayGridMonth');
},
100);

image

davish commented 1 year ago

@vran-dev, can you please confirm that all the events show up in a dataview list? It's possible this is an issue with your query rather than with the calendar view.

vran-dev commented 1 year ago

@vran-dev, can you please confirm that all the events show up in a dataview list? It's possible this is an issue with your query rather than with the calendar view.

thanks for your reply, i confirmed that all the events is show up in a dataview list, i try to change start: item.beginTime.ts => start: item.beginTime, it's als not working.