question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

:disabled attribute not working

See original GitHub issue

I’m submitting a … (check one with “x”)

[x] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[ ] Other, please describe

Tell about your platform

  • flatPickr version : 4.4.4
  • Vue.js version : 2.5.2
  • Browser name and version : Firefox 61
  • This package version : 7.0.1

Current behavior when I write script like this: <flat-pickr v-model="item.DEPODT" input-class="date-input" :config="configflp" :disabled="!editmode"></flat-pickr>

and config:

configflp: {
	altInputClass: 'p-0 text-center ',
},

then I change value of editmode to true, result: the component is still disabled

Expected behavior I expect the component respect disabled attribute

Thank you very much.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
ankurk91commented, Jul 27, 2018

Flatpickr creates two input fields (one is hidden) when we pass altInput to true. screen shot 2018-07-27 at 12 30 46 pm

Vue component can only pass attributes to initial input field but flatpickr makes it hidden. So attributes like :class, :disabled or :placeholder can not be dynamic when altInput is true

0reactions
devonikcommented, Jan 14, 2019

In my case I need to use the altInput Option because I need to display different Date Formats.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML input "disabled" attribute not working in Bootstrap modals
The problem is, my browser (Chrome) is not reflecting the disabled attribute for any form element within the modal dialog.
Read more >
HTML attribute: disabled - HTML: HyperText Markup Language
The Boolean disabled attribute, when present, makes the element not mutable, focusable, or even submitted with the form.
Read more >
Topic: disabled attribute not working? / sciter
I'm using a custom checkbox with it's attribute disabled, but it does not act like a disabled input (you can still check and...
Read more >
HTML disabled Attribute - W3Schools
The disabled attribute is a boolean attribute. When present, it specifies that the element should be disabled. A disabled element is unusable. The...
Read more >
Input Disabled HTML Attribute Explained For Inexperienced ...
If a field is disabled , the value of the field is not sent to the server when the form is submitted. If...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found