Skip to content
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

startTime and endTime are not set to current date #34

Closed
prox2 opened this issue Jan 18, 2021 · 4 comments
Closed

startTime and endTime are not set to current date #34

prox2 opened this issue Jan 18, 2021 · 4 comments

Comments

@prox2
Copy link

prox2 commented Jan 18, 2021

when I log the data of events the starttime and end time are shown like this :

"endTime": 2019-07-01T13:00:00.000Z,
"startTime": 2019-07-01T11:00:00.000Z,

Why year and month always set to 2019-07 ?
when I checked the utils.js file i fount this

return new Date(``2019-07-${str2numberString[DayOfWeekString.toLowerCase()]}T00:00:00``);

so how to make it set automatically based on the current date of adding the event data?

@rubycho
Copy link
Collaborator

rubycho commented Jan 18, 2021

Well, though I didn't participated on writing utils.js, but to my knowledge, that week was selected because 2019-07-01 is Monday, assuming timetable applications usually handle periodical tasks or events, rather than event on specific dates. @guy490 #24 also created an issue related to that code piece.
So, could you explain more concretely, about the reason why you want to have current dates?

@prox2
Copy link
Author

prox2 commented Jan 18, 2021

Hey @rubycho
So i am building an attendance app for student and i am using this amazing tool to set their classes timetable which give me a good look and feel,
So i am getting the events_data from mysql data base and later on event clicked(class in my case) the details of class time and date (current date of that day will be displayed)
So getting current date will help to manage attendance reports later as all details will be stored in database so that why i prefer getting the current date .

@rubycho
Copy link
Collaborator

rubycho commented Jan 18, 2021

Thanks for the explanation. Unfortunately, there seems no support or functions for that purpose currently.
Rather there will be some alternative method, which you could handle on outside of this library,
such as defining your function convertDate(e) and calling it before callback, to convert the old dates on event to current dates, which matches the day of week.

@prox2
Copy link
Author

prox2 commented Jan 18, 2021

@rubycho
Thank you suggestion, i will try that

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

No branches or pull requests

3 participants