I'm working with the datetimepicker found here:
http://eonasdan.github.io/bootstrap-datetimepicker/
Maybe the answer is right in front of me, but I can't find it. How do you default to showing the edit time screen first? I'm creating a time keeping app, and I'd rarely change the date, but usually change the time.
Thanks for any help!
Ok, its a little hackey but based on the response here:
https://github.com/Eonasdan/bootstrap-datetimepicker/issues/840
i added
$(".datetimepicker").on 'dp.show', () ->
      $(document).find('.picker-switch a[data-action="togglePicker"]').click()
to my coffeescript. The Jquery equivalent would be
$(".pickthetime").on('dp.show', function(){
  $(document).find('.picker-switch a[data-action="togglePicker"]').click()
});
It sort of does what I'm looking for, but the slide motion makes it look kinda crappy. Any thoughts?
My 2 cents
('#myDatetimepicker').datetimepicker({
        icons: {
            time: "icona-orologio",
        }
    }).on('dp.show', function(e){
        setTimeout(function(){
            $('.bootstrap-datetimepicker-widget').find('.icona-orologio').parent().click();
        }, 300);
    });
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With