ui-date icon indicating copy to clipboard operation
ui-date copied to clipboard

ignoreReadonly()

Open rkoszalka opened this issue 8 years ago • 1 comments

Hello, i'm trying to get ignoreReadonly() option to work in my app.

So far i've tried this: var dateStart = document.getElementById('dateStart');

angular.element(dateStart).datepicker('option', 'ignoreReadonly', 'true');

and

angular.element(dateStart).datepicker({ ignoreReadonly : true });

but none of them worked, is this feature implemented in Angular Ui Date?

Or does any of you guys know a alternative way to prevent mobile keyboard from show up?

Thank you!

rkoszalka avatar Jun 15 '16 13:06 rkoszalka

I found a way to do that. I've changed the following if statement (located at line 194 of date.js):

 if (attrs.readonly) {
                  focusEvent.stopImmediatePropagation();
                }

to that:

 if (!attrs.readonly) {
                  focusEvent.stopImmediatePropagation();
                }

And added the readonly attribute to my HTML input.

rkoszalka avatar Jun 15 '16 13:06 rkoszalka