zulihan / ng-timetable

An adaptation of Timetable.js for Angular
5 stars 1 forks source link

Hours are not matching #1

Open friou opened 5 years ago

friou commented 5 years ago

Hello,

First of all, I want to thank you for your TS version of Timetable.js, that's exactly what i'm looking for.

But when I've try to use it, i found a problem : hours in the .ts and on the Schedule are not Matching.

This is the render : image This is the code : image

In my case, I'm trying to set an event from 20:00 to 0:00. As you can see, this is not working. Even when I try to set date as string (new Date('2018-07-28T00:00:00'), for example).

If you have any clue…

zulihan commented 5 years ago

Hi Riouf,

Sorry for the very late answer, Don't really have much time to look into it now, but it seems that you would need to set the scope to a 24 hours range, like so: this.timetableFirst.setScope(20,20); I'm actually facing the same issue. Haven't figured out how to fix this yet. But will try to find a solution hopefully this week.

friou commented 5 years ago

Hello Zulihan,

I finally found a way to fix it.

You can refer to this issue : https://github.com/Grible/timetable.js/issues/44.

I've send a pull request and awaiting for answer.

Alerodram commented 4 years ago

I think I've found a better way to fix it.

You can just adjust your scope in the constructor of the Timetable class (_timetable/timetable.ts).

So you can set your variables 'hourStart' and 'hourEnd' to the values that you need to set as limits of your timetable scope.

I've also realized that onClick is not working in the timetable events. Any fix about it?