Skip to Content
avatar image
Former Member

sap.m.DatePicker issue

Does anyone know how to make the SAPUI5 control sap.m.DatePicker read only? I would like to be able to show the standard calendar UI to the user if he clicks on the little calendar icon but the user shouldn't be allowed to actually change the date. I am try js view for designing.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Sep 09, 2017 at 08:51 PM

    I think below work around would work, perform below 2 tasks,

    1) disable pointer focus in input using below css code,

    .sapMInputDivWrapper {
        pointer-events: none;
    }

    2) you must have previous date value somewhere in the model property or a variable, keep this, and implement 'change' event of datepicker and return/set previous value only instead of changed value.

    hope this works!

    Add comment
    10|10000 characters needed characters exceeded