Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

ignoreReadonly() #168

Open
rkoszalka opened this issue Jun 15, 2016 · 1 comment
Open

ignoreReadonly() #168

rkoszalka opened this issue Jun 15, 2016 · 1 comment

Comments

@rkoszalka
Copy link

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
Copy link
Author

rkoszalka commented Jun 15, 2016

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant