The HTML does not load jquery.ui.datepicker.js; its head contains:
<link data-turbolinks-track="true" href="/assets/active_scaffold.css?body=1"
media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/application.css?body=1"
media="all" rel="stylesheet" />
<script data-turbolinks-track="true"
src="/assets/jquery.js?body=1"></script>
<script data-turbolinks-track="true"
src="/assets/jquery_ujs.js?body=1"></script>
<script data-turbolinks-track="true"
src="/assets/turbolinks.js?body=1"></script>
<script data-turbolinks-track="true"
src="/assets/getprototypeof.js?body=1"></script>
<script data-turbolinks-track="true"
src="/assets/jquery/active_scaffold.js?body=1"></script>
<script data-turbolinks-track="true"
src="/assets/jquery/jquery.editinplace.js?body=1"></script>
<script data-turbolinks-track="true"
src="/assets/active_scaffold.js?body=1"></script>
<script data-turbolinks-track="true"
src="/assets/application.js?body=1"></script>
My user controller contains:
class UsersController < ApplicationController
active_scaffold :"user" do |conf|
conf.columns[:birthday].form_ui = :date_picker
end
end
The column is of type 'date'.
However, the form input rendered is just a textbox and not a date picker.
Changing form_ui to :datetime_picker does not work either.
If possible, please create a brand new Rails 4.1.4 application using AS
master with just one User controller with fields name: string and
birthday:date, and see if it is able to load the date_picker UI.
Thanks.
From: [email protected]
[mailto:[email protected]] On Behalf Of Sergio Cambra
Sent: Friday, August 01, 2014 2:18 AM
To: [email protected]
Subject: Re: Need help with getting date_picker to work in Rails 4.1.4 +
ActiveScaffold 3.4.1
Check if jquery.ui.datepicker.js is loaded in your html
Check form_ui for date or datetime columns in console, in should be
:date_picker or :datetime_picker
YourController.active_scaffold_config.columns[:date_column].form_ui
El Viernes, 1 de agosto de 2014 01:34:20 Tin Vo escribió:
> 2.0.0-p481 :002 > Jquery.const_defined?('Ui')
>
> => true
>
> 2.0.0-p481 :003 > ActiveScaffold::Bridges::DatePicker.jquery_ui_included?
>
> => true
>
> 2.0.0-p481 :004 > ActiveScaffold::Bridges::DatePicker.install?
>
> => true
>
> 2.0.0-p481 :005 > ActiveScaffold.exclude_bridges.exclude? :date_picker
>
> => true
>
>
>
> All returns true.
>
>
>
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Sergio Cambra
> Sent: Friday, August 01, 2014 1:11 AM
> To: [email protected]
> Subject: Re: Need help with getting date_picker to work in Rails 4.1.4 +
> ActiveScaffold 3.4.1
>
>
>
> If jquery-ui-rails is on your gemset, activescaffold will load, no need to
> add to javascripts and stylesheets, only jquery.ui parts not used by
> ActiveScaffold.
>
>
>
> Check this on console:
>
> Jquery.const_defined?('Ui')
>
> ActiveScaffold::Bridges::DatePicker.jquery_ui_included?
>
> ActiveScaffold::Bridges::DatePicker.install?
>
> ActiveScaffold.exclude_bridges.exclude? :date_picker
>
> El Jueves, 31 de julio de 2014 15:07:48 Tin Vo escribió:
> > jquery-rails is there by default; without it, AS wouldn't work; normal
> >
> > operation of AS works; however, I couldn't get the date_picker to work.
> >
> >
> >
> >
> >
> >
> >
> > I have tried using the jquery-ui-rails gem and added the assets for
> >
> > javascript and stylesheets (ie: jquery-ui.date_picker), but it did not
>
> work
>
> > either.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > From: [email protected]
> >
> > [mailto:[email protected]] On Behalf Of Sergio Cambra
> >
> > Sent: Thursday, July 31, 2014 3:33 AM
> >
> > To: [email protected]
> >
> > Subject: Re: Need help with getting date_picker to work in Rails 4.1.4 +
> >
> > ActiveScaffold 3.4.1
> >
> >
> >
> >
> >
> >
> >
> > Do you have jquery-rails and jquery-ui-rails gems in your Gemfile?
> >
> > El Miércoles, 30 de julio de 2014 09:44:02 Tin Vo escribió:
> > > I've done the following:
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 1. created a brand new Rails 4.1.4 application.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 2. added gem 'actie_scaffold' in the Gemfile.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 3. added the assets for JS and CSS.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 4. create a model with "rails g active_scaffold User name:string
> > >
> > >
> > >
> > > birthday:date"
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 5. rake db:migrate
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 6. rails s
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 7. open localhost:3000/users
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Everything works but when creating/editing a new user, the the
birthday
> > >
> > >
> > >
> > > field does not have date_picker.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > From: [email protected]
> > >
> > >
> > >
> > > [mailto:[email protected]] On Behalf Of Sergio Cambra
> > >
> > >
> > >
> > > Sent: Wednesday, July 30, 2014 3:16 AM
> > >
> > >
> > >
> > > To: [email protected]
> > >
> > >
> > >
> > > Subject: Re: Need help with getting date_picker to work in Rails 4.1.4
+
> > >
> > >
> > >
> > > ActiveScaffold 3.4.1
> > >
> > > El Miércoles, 30 de julio de 2014 00:49:34 Tin Vo escribió:
> > > > I can't seem to get the date_picker to work. Any help is
appreciated.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Thanks.
> > >
> > > What steps have you done?
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.