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

Date, Time, Datetime, and creating events #165

Open
mbrakken opened this issue Mar 17, 2014 · 1 comment
Open

Date, Time, Datetime, and creating events #165

mbrakken opened this issue Mar 17, 2014 · 1 comment

Comments

@mbrakken
Copy link
Collaborator

Events have start_time and end_time stored as datetime. Currently the event forms have

.form-group
  = f.label :start_time, "Start Date"
  = f.date_field :start_time, class: 'form-control'
.form-group
  = f.label :start_time
  = f.time_select :start_time, class: 'form-control', ampm: true, minute_step: 15
.form-group
  = f.label :end_time, "End Date"
  = f.date_field :end_time, class: 'form-control'
.form-group
  = f.label :end_time
  = f.time_select :end_time, class: 'form-control', ampm: true, minute_step: 15

Basically, we have 2 fields each for start_time and end_time. Because the second in each set only brings in time, it defaults the date to the current date. This means start_date and end_date will always be saved as the current day.

We'll need to parse these in the create/update methods.

@mbrakken
Copy link
Collaborator Author

I have some hacky code in the styles branch to address this, but could probably be done better. Also, I think things will fail in the event that someone is using a non-compatible browser.

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

1 participant