omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Setting minute increment size for datepicker

    Pythonista
    2
    3
    1066
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rgorinstein
      rgorinstein last edited by

      Hello,

      I’d like to be able to alter the datepicker so the minute increments are only shown as 5- or 15-minute increments rather than 1-minute increments as it defaults. In Calendar.app, for example, the iOS time picker defaults to 5-minute increments. Is there any way to achieve this?

      Thanks in advance!

      JonB 1 Reply Last reply Reply Quote 0
      • JonB
        JonB @rgorinstein last edited by

        I haven't tried it but

        minuteInterval
        

        Attribute of the picker objc_instance should do it.

        1 Reply Last reply Reply Quote 0
        • JonB
          JonB last edited by JonB

          d=ui.DatePicker()
          d.mode=ui.DATE_PICKER_MODE_DATE_AND_TIME
          d.objc_instance.minuteInterval=5
          d.bg_color='white'
          d.present()
          
          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          Powered by NodeBB Forums | Contributors