Android datetime field collision with keyboard

Android datetime field collision with keyboard

javismilesjavismiles Posts: 205Questions: 38Answers: 3

Feels like a bug,
- datetime field
- click on create new row button
- go till the datetime field, click on it
- the calendar picker opens
- But... the android keyboard is also triggered
causing a big big mess and its very hard to manipulate the calendar, you close the keyboard, click on calendar and keyboard comes out again, impossible,
you gotta prevent keyboard from coming out

thank you

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,452Questions: 1Answers: 10,055 Site admin

    Use the keyInput option of the datetime input type to disallow user input via keyboard. That will also disable the virtual keyboard on mobile platforms.

    Allan

  • javismilesjavismiles Posts: 205Questions: 38Answers: 3

    that sounds like a great idea Allan, but I just added it and the android virtual keyboard keeps popping out, I set it to false like this, see:

    $.map(obj.fields, function(obj, index) {

            if (obj.t=="datetime"){
                fieldobj[index]  = {
                label: obj.d,
                name:  obj.i,
                className: obj.c,   
                keyInput:false,
                type:  "datetime",
                def: function () { return new Date(); },
                format: 'YYYY-MM-DD HH:mm:ss',
                fieldInfo: 'Euro style date with 24 hour clock...'  
            };
    
  • javismilesjavismiles Posts: 205Questions: 38Answers: 3
    edited August 2018

    furthermore, I can see on the PC that indeed the key input is disabled, so it works, however the android virtual keyboard keeps triggering out with every action, so it doesnt work and its terribly annoying as the android keyboard comes out every time you touch anything, ooooooops

  • allanallan Posts: 61,452Questions: 1Answers: 10,055 Site admin
    Answer ✓

    Yes - that would be annoying!

    Try adding:

    attr: {
      readonly: true
    }
    

    Allan

  • javismilesjavismiles Posts: 205Questions: 38Answers: 3

    Yessss, that made it work well, thank u Allan ;)

This discussion has been closed.