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

Start and End time #5

Open
Fabien3d opened this issue Oct 27, 2022 · 4 comments
Open

Start and End time #5

Fabien3d opened this issue Oct 27, 2022 · 4 comments

Comments

@Fabien3d
Copy link

Hello,
First of all, thaks for your work!
I've tried to work on the jquery-schedule project trying to add a start and end time, to make the schedule start at 8:00 and end at 22:00 : https://fabien-nguyen.fr/jquery-schedule-master/Test.html.

I added two variables, 'beginningofday' and 'endofday' :

var defaults =
mode: 'edit', // read
hour: 14, // 12
days: 5, // 7/5
periodDuration: 30, // 15/30/60
data: [],
periodOptions: true,
periodColors: [],
periodTitle: 'Enseignement',
periodBackgroundColor: 'rgba(82, 155, 255, 0.5)',
periodBorderColor: '#2a3cff',
periodTextColor: '#000',
periodRemoveButton: 'Supprimer',
periodDuplicateButton: 'Dupliquer',
periodTitlePlaceholder: 'Enseignement',
daysList: [
'Lundi',
'Mardi',
'Mercredi',
'Jeudi',
'Vendredi',
'Samedi',
'Dimanche'
],
beginningofday: 8,
endofday: 23,
onInit: function () {},
onAddPeriod: function () {},
onRemovePeriod: function () {},
onDuplicatePeriod: function () {},
onClickPeriod: function () {}
},

But for the moment, it only displays the customized start and end time on the grid.

So, there are two problems:
• when I create a new period, it displays time in the title as if the grid started at 00:00, so the times are wrong;
• the export periods are wrong ;
• the import periods are wrong too!

Any tip to change the starting time?

@robertsLando
Copy link
Member

robertsLando commented Oct 28, 2022

There is no support ATM for such feature, if you check the code those options are not present, the only available options are the one listed in readme.

Would you like to submit a PR?

I would suggest instead of using start/end something like minHour and maxHour to allow disable some hours blocks

@Fabien3d
Copy link
Author

Fabien3d commented Nov 7, 2022

Hello,

Thanks for your reply!
In the code of my original post, I tried to add two variables :

beginningofday: 8,
endofday: 23,

As I wrote, if these variables are used in the jquery-schedule code, the time table starts at 8:00 and ends at 22:00, but everytime I add a new period, i.e. at 08:00, the period displays 00:00.

I'm not sure jquery-schedule is still active, but it could be added in your code!

@robertsLando
Copy link
Member

robertsLando commented Nov 7, 2022

I'm not sure jquery-schedule is still active, but it could be added in your code!

It isn't, this project uses just the same ui design but the code has been completely rewritten and that function hasn't been added yet

@Fabien3d
Copy link
Author

Fabien3d commented Nov 8, 2022

OK, thanks!
I don't know if I can add this feature in this code, so I can't really add a pull request!

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

2 participants