mardi 22 mars 2022

Timepicker in Rails

I have included this in the .html.slim file

= f.input :customized_agent_timeslot 
.container
  .row
    .col-sm-2
      .form-group
        #datetimepicker3.input-group.date
          input.form-control type="text" /
          span.input-group-addon
            span.glyphicon.glyphicon-time
    javascript:
      | $(function () {
          | $('#datetimepicker3').datetimepicker({
              | format: 'H:i'
          | });
      | });

Added this in the application.css.sass

 //= require datetimepicker

Added this in the application.js.coffee

 #= require datetimepicker

in the gem file i have included

   gem 'rails-assets-datetimepicker'

i am able to see the UI but on clicking the dropdown for choosing time doesn't show.

Are there any steps that i 'm missing up??

Aucun commentaire:

Enregistrer un commentaire