Timepicker to 24H format

Hi!
How define calendar time format n the 24-hour?
calendarTime:"%H:%i" - not work (

Comments

  • Can you provide a snippet? As far as I can see, it works:

    http://webix.com/snippet/69682ae0

  • For datepicker you need to use format property:

    http://webix.com/snippet/26f24072

  • Возможно, я чего-то не понимаю... Но в таблице, которая выскакивает при нажатии на кнопку цифры не в 24 часовом формате...
    https://yadi.sk/i/EeDPPOiXsEaNX

  • В отличии от другого виджета https://yadi.sk/i/EeDPPOiXsEaNX

  • В первую очередь, есть более простой способ - можно задать русскую локаль, и отображение времени изменится нужным образом:

    http://webix.com/snippet/3d1597ee

    Также можно изменить конфигурацию внутреннего календаря:

    view:"datepicker", 
    format:"%H:%i",
    suggest:{
       type:"calendar", 
       body:{
          type:"time",
          calendarTime:"%H:%i"
    }}
    

    http://webix.com/snippet/4ee6e0d6

  • Супер!!!!
    Спасибо большое! Ваш фреймворк самый лучший! )))

  • Варинат с локалью у меня почему-то не работает (((

  • Локаль работает только в таком случае:

    webix.i18n.locales["ru-RU"]={
    groupDelimiter:" ",
    groupSize:3,
    decimalDelimeter:".",
    decimalSize:2,

                //dateFormat:"%m/%d/%Y",
                dateFormat:"%d.%m.%Y",
                timeFormat:"%H:%i %A",
                longDateFormat:"%d %F %Y",
                fullDateFormat:"%d.%m.%Y %H:%i %A",
    
                price:"{obj}руб.",
                calendar: {
                    monthFull:["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"],
                    monthShort:["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"],
                    dayFull:["Воскресение", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"],
                    dayShort:["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"]
                }
            };
    
  • Проверьте, пожалуйста, подключился ли к странице js-файл с локалью. Используйсте адрес http://cdn.webix.com/site/i18n/ru.js

    https://jsfiddle.net/Wolfsbane/8z66909f/

  • Спасибо!
    После подключения этого файла все заработало!

  • Is there as way to set the time more precise then every 5 minutes. i need to know the precise minute value.

  • edited May 2017

    Time step can be controlled by the minuteStep property of the calendar component. And you will need to adjust CSS and dimensions, as the default settings do not presuppose such precise time handling.

    Check the following snippet, please: https://webix.com/snippet/1c7194cd

  • The above snippet does not work using the minuteStep:1 on any of the examples shown. Maybe it worked in 2017 but it does not now. Is there another way of showing all of the seconds?

  • Hi @daverch

    Unfortunately, the minuteStep now supports the limited number of values.
    This was made intentionally, as the calendar was not designed to fit more than 12 time slots.

    As an alternate solution, I would suggest setting time and date separately, then conjoin selected values, if needed.
    In this case, you'll be able to create UI of any complexity.
    Here's the most simple example of a custom time selector, where time can be set in several form controls (counter, slider, or richselect): https://snippet.webix.com/ckyyrogr
    For more details on possible options, please check the related article in our blog.

    Also, there is a known use-case of a custom time selector: https://snippet.webix.com/3s4d9dsi
    This snippet is based on examples mentioned in the above article (but several components were combined in one view).

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!