Using a Meteor autoform-bs-datetimepicker for time only
Asked Answered
G

1

7

There's a Meteor wrapper for the bootstrap datetimepicker. In the bootstrap docs, you can specify selecting time only (#datetimepicker3). I want to do this in Meteor. I've tried using

  {{> afQuickField name="departureTime" dateTimePickerOptions=timePickerOptions}}

  timePickerOptions : function() {
    return {
      format : 'LT'
    }
  },

however this still shows the calendar (although it does allow you to select the time). Is there something I'm missing here?

Got answered 6/11, 2015 at 23:42 Comment(1)
@MatthiasEckhart same thing happensGot
E
2

try to load it with your options, to be sure, that they are loaded before the template starts rendering..

{{#with timePickerOptions}}
  {{> afQuickField name="departureTime" dateTimePickerOptions=this}}
{{/with}}
Ensheathe answered 16/11, 2015 at 3:11 Comment(2)
Have you tried it without auto-form? I mean, maybe there is a problem with the library itself..Ensheathe
@ahota found the problem: autoform-bs-datetimepicker is not compatible with datetimepicker 4.x because of API change..Ensheathe

© 2022 - 2024 — McMap. All rights reserved.