New time schedule - Database

0

I have an ordering system, where the product delivery time is selected in a normal input of type='time' , and stored in the database in type time as well. Everything is working perfectly, however I will have to change and it has to be as follows:

User selects a select schedule that will be as follows:

 08:00 - 09:00
 09:00 - 10:00

... and so on closing the 24 hours of the day

My question is how to do this select, if I have to do it manually in a select or if there is a plugin.

The most important question is what kind of data I could save this new time method in the database

    
asked by anonymous 09.03.2017 / 22:40

2 answers

1

Create a table with these schedules and list them in the select, so if you have to add more schedules then it's easy, just add them to the table.

Save them in time format, if you do not need seconds just format it at the time of listing.

    
10.03.2017 / 21:13
0

The select is usually created with type = time, and the times are saved in a new table that has reference to the user table.

    
13.03.2017 / 19:59