designtrooper — 2014-06-04T14:13:05-04:00 — #1
I am building an events calendar.
When the user clicks a cell a popup box appears with a 2 dropdown menus,the one depicting the start date of the event the other the end date of the event.
The start/end dates are both UNIX timestamps.
But consider this...after the user selects a date range(just like in outlook.com calendar) he chooses -from the dropdown menus- to select another date range.
The problem is this:
How am i going to create a dropdown menu where each option value will have a timestamp corresponding to the date selected.
Can the timestamps I already have help in the creation(as a basis for calculation) of this dropdown menu-to create the other timestamps too.
If you go to oulook.com calendar you will see that in the left dropdown menu of the popup....if you see of course the HTML source
eruna — 2014-06-05T15:25:33-04:00 — #2
I think using the jQuery date picker will make your life a lot easier: http://jqueryui.com/datepicker/
It can drop the timestamp in. Otherwise, I would generate the options server side.
designtrooper — 2014-06-06T17:22:52-04:00 — #3
The datepicker works for days/month not for selecting hours as I want.
You say,also to to generate the options server side-I am not sure if this the correct thing to do in my case.
I am building an events calendar based in this tutorial [http://blog.shinetech.com/2011/08/05/building-a-shared-calendar-with-backbone-js-and-fullcalendar-a-step-by-step-tutorial/ with this plugin [URL="http://arshaw.com/fullcalendar/"]http://arshaw.com/fullcalendar/](http://blog.shinetech.com/2011/08/05/building-a-shared-calendar-with-backbone-js-and-fullcalendar-a-step-by-step-tutorial/)
As you will notice everything is done with backbone and js.
So I am not sure if "server-side" is the correct choice here-I am not saying it is not,I am not just sure.
I was considering to construct the dropdown with a JS for loop.