owenmead / Pikaday

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS
Other
153 stars 73 forks source link

Options to keep the picker open #56

Closed arthurkirkosa closed 6 years ago

arthurkirkosa commented 7 years ago

Are there any options to keep the date time picker open when changing the hour and/or minute?

Or by adding a button which will perform the change after pressing it?

It's annoying to have to open the picker 3 times if you want to change the date and time.

tomalexhughes commented 7 years ago

Seems like you're looking for the autoClose property, try setting autoClose: false and see if you get the desired behaviour.

arthurkirkosa commented 7 years ago
const dateColumn = {
      type: 'date',
      dateFormat: store.dateFormat,
      correctFormat: true,
      datePickerConfig: {
        use24hour: true,
        autoClose: false,
      },
    };

@tomalexhughes like so? It's still closing the picker window when hour, minute or date is selected :|

tomalexhughes commented 7 years ago

Not quite sure on your exact code to be honest, is anything within the datePickerConfig working or is it just autoClose that is not working.

My code is below if it is any use to you:

  import Pikaday from 'pikaday-time';
  const bookingDateField = document.getElementById('booking-date');

  const bookingPicker = new Pikaday({
    field: bookingDateField,
    format: 'DD/MM/YYYY HH:mm',
    use24hour: true,
    autoClose: false,
    incrementMinuteBy: 30
  });
arthurkirkosa commented 7 years ago

Hmmm... I'm using Pikaday in the context of HandsOnTable (handsontable.com)... maybe that's making it behave differently in this case

owenmead commented 6 years ago

Thanks for the feedback. I'm no longer maintaining this code. Happy to point this repo to yours if you would like to carry the torch from here.