obsidian-full-calendar icon indicating copy to clipboard operation
obsidian-full-calendar copied to clipboard

event missing in dataview calendar

Open vran-dev opened this issue 1 year ago • 2 comments

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

  • [x] I searched previous Bug Reports and didn't find any similar reports. *

Steps to reproduce

  • create a page with yaml formatter in "project" folder
---
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: []
---
  • use databiewjs to query pages from "project" folder and rendering as calendar
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);
  • event in someday is missing in calendar beginTime => 4-10 rendered, endTime => 4-15 rendered, 4-11 ~ 4-14 is missing

image

vran-dev avatar Apr 17 '23 02:04 vran-dev