-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Header with month and year in resourceTimelineMonth #386
Comments
Hello. Sorry, I don't have a quick answer right now. I'll think about the implementation. |
Hello, |
Oh nice, thank you. I'll take a look at it first thing tomorrow morning and report back! |
I have included your suggestion to my last push. Also I wouldn't mind you sharing your css for the events :). |
It's the least I can do :) I've created a codepen for it. Also added comments in the css to explain what goes where. (Resizing the events behaves strangely in codepen for some reason. It works fine as an html file) |
I just noticed that there is something wrong with the 'viewMonths' function. It doesn't create the proper month set. For example look at January in the screenshot. For now, I recreated the array, but it kept pushing just 1 date entry to a 4th month array (Febr. in my case), which I decided to just delete any arrays that are not full month sets. 'Hacky' way I know, but I just cant handle this whole UTC+2 different start/end dates anymore.
Edit: Something is happening with the borders as well on header. I've brought 6 months of data and the vertical lines dont line up with the calendar grid towards the end. |
for the borders, i will push the corrected css. and i'll ad a commented version of viewMonths try it instead of the current one and tell me if it works for you. |
I’ve completed all the fixes, and everything is working perfectly now. The cell alignment issue has been resolved, and the header looks great. Instead of using the event-calendar.css, I made the necessary adjustments through an overwrite css,. You can find it here: link. So in the end, using your existing event-calendar.js file along with the following updated viewMonths function in \packages\core\src\storage\stores.js, the calendar now populates all months correctly in the arrays, ensuring no dates are missing.
(I separated the css changes into a standalone file, so that any future updates can be made exclusively within the js file.) |
There was already a similar version of viewMonths commented out in the code: the one i am using wich works for me:
The commented out (same as yours except for the setMidnight method):
the second version is the one making more sense but I have no idea why it is not working for me. |
I tried to implement something like this in the Header.svelte of resource-timeline, but failed epically. How hard would it be to implement something like this? I think it would be a nice feature instead of the centered title it has now.
(I am using a duration: {month: 3}, which is why I am asking. Easier on the eye when you scroll)
The text was updated successfully, but these errors were encountered: