ui-date
ui-date copied to clipboard
ignoreReadonly()
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!
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.