Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to disable datepicker element #1633

Closed
EastSideAngus opened this issue Sep 24, 2020 · 3 comments
Closed

No way to disable datepicker element #1633

EastSideAngus opened this issue Sep 24, 2020 · 3 comments

Comments

@EastSideAngus
Copy link

How does one set a datepicker element as readonly either on initialization or later through a JS call?

I've tried attributes like disabled and readonly on the input element with data-role being datepicker, but they don't work.

I've tried using the data- prefix, but that doesn't seem to do the trick.

I would expect there is some way to disable an input element of type datepicker. Is that the case or no?

Thank You

olton added a commit that referenced this issue Sep 24, 2020
… added observing for prop `disabled`, issue #1633
@olton
Copy link
Owner

olton commented Sep 24, 2020

Fixed in 4.4.0

@olton olton added this to the 4.4.0 milestone Sep 24, 2020
@olton
Copy link
Owner

olton commented Sep 24, 2020

to disable datepicker use property disabled for input element:

<input data-role="date-picker" disabled data-label="Select date" id="p3">

<button class="button" onclick="$('#p3').prop('disabled', false)">Enable picker</button>
<button class="button" onclick="$('#p3').prop('disabled', true)">Disable picker</button>

@olton
Copy link
Owner

olton commented Sep 24, 2020

Thank you for this request.

olton added a commit that referenced this issue Sep 25, 2020
… added observing for prop `disabled`, issue #1633
@olton olton closed this as completed Sep 28, 2020
olton added a commit that referenced this issue Oct 28, 2023
… added observing for prop `disabled`, issue #1633
olton added a commit that referenced this issue Oct 28, 2023
… added observing for prop `disabled`, issue #1633
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants