You are reading a single comment by @Pologram and its replies. Click here to read the full conversation.
  • Thanks, that's indeed more elegant.

    I think I'm all set now. I also created a triple int picker because why not. (see attachments) I don't think I can make more than 3 columns though because the screen is not that big.

    The result looks pretty similar to the "stock" picker. I also added the possibility to add custom separators like : for times and / for dates. (who knows, maybe soccer players will use - to input a score for example)

    In code it can be used quite easily with a syntax that is very similar to the stock one:

    function showMainMenu() {
      E.showMenu({
        'Date': function () {
          showTripleIntPicker({
            back: showMainMenu,
            title: "Date",
            //separator_1: "/",
            //separator_2: "/",
            value_1: day,
            min_1: 1, max_1: 31, step_1: 1, wrap_1: true,
            value_2: month, 
            min_2: 1, max_2: 12, step_2: 1, wrap_2: true,
            value_3: year,
            min_3: 2000, max_3: 2050, step_3: 1, wrap_3: false, 
            format_1: function (v_1) { return (pad2(v_1)); },
            format_2: function (v_2) { return (pad2(v_2)); },
            onchange: function (v_1, v_2, v_3) { day = v_1; month = v_2; year = v_3; }
          });
        }
      });
    }
    
    showMainMenu();
    

    Next order of business is to whip a MR :)


    2 Attachments

    • screenshot (1).png
    • screenshot.png
About

Avatar for Pologram @Pologram started