Calender View #464
Replies: 2 comments 2 replies
-
First things first - this is very cool! I like the usage of a table to create the Calendar outline; the only hard part seems to be how to implement "events" that span across multiple days. Using date ranges as the query source is very interesting - it could probably be implemented directly in the For the query, happy to discuss this in gritty detail over discord or similar, but I would implement this by figuring out what you would want the query to be able to support; i.e., maybe something like CALENDAR <field1> AS <name1>, ... FROM dates(2021, 2022)
WHERE ... To do this implementation wise, you would need to add a parser for the |
Beta Was this translation helpful? Give feedback.
-
Hi! Huge fan of the implementation as-is, but I'm curious whether there's any way/plan to set the calendar to show in a week format instead of month. Just a curiosity, not a request! Thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I was wondering if we could chat about how best to implement a calendar view.
Disclaimer: by day a c++ programmer dealing with numbers, new to typescript
To get some understanding of typescript and how the plug-in works, I started by creating a rudimentary calendar view. So that I would be better prepared to have a discussion about how to implement a more formal calendar view. I am happy to change anything; my first attempt may not be the best long term; I am aware of some drawbacks of it.
My idea was to use the table implementation to handle getting the list of files and whichever associated properties the user wanted.
I have not implemented the
Query
part and passing that onto theDataviewCalendarRenderer
. For now I have a hard coded query where I usefile.ctime
as my main date property. The additional associated properties could be additional rows in a calendar event item.Current implementation:
WHERE file.ctime == date
, is runDifferent date interval views
Note: Screenshots are using the default light theme. The theme can dictate the file width, and thus it effects the widths of the columns.
This implementation is date-centric, where the main iteration loop is a date. I appreciate one could also do this with a file-centric approach, where one iterates through a list of sorted files, and checks the date property. A date-centric approach for a calendar seemed cleaner to me: as each day has an independent table, and the full flexibility of a query of a table; and it seemed easier to deal with dates with no files. Though this date-centric approach may not be the best when properly considering how to implement the
Query
part.I think the query implementation is my next step, and an important part. That is somewhere where I would appreciate some help as I don't have enough understanding with how it works. In my current approach: I need to take the raw string; split parts of it up; insert the calendar day query part; and then run it. I am not sure this is possible with how
Query
works.This is where I am currently at, lots of questions, things to add and clean up. I thought a discussion would be good at this stage to optimise development, time spent, and progress. Again happy to change anything, the work so far was just me playing around in a hopefully useful way.
Beta Was this translation helpful? Give feedback.
All reactions