can i pass min and max to datetime_select

19 views
Skip to first unread message

fugee ohu

unread,
Dec 2, 2015, 2:03:50 AM12/2/15
to Ruby on Rails: Talk
can i pass min and max to datetime_select ?

Colin Law

unread,
Dec 2, 2015, 4:21:32 AM12/2/15
to Ruby on Rails: Talk
On 2 December 2015 at 07:03, fugee ohu <fuge...@gmail.com> wrote:
> can i pass min and max to datetime_select ?

Why have you asked the same question twice?

You can use validations to ensure that only valid values are saved,
but datetime_select is not able to limit the range.

I believe that in order to do that you would need a js solution such as
http://amsul.ca/pickadate.js/date/, though I have not used it.

Are you actually trying to input an elapsed time or is it an actual
datetime that you want?

Colin

fugee ohu

unread,
Dec 2, 2015, 11:02:23 AM12/2/15
to Ruby on Rails: Talk
it's for scheduling, you should only be able to schedule from present to future but not have backdate options
Reply all
Reply to author
Forward
0 new messages