Comments (1)
I'm in a situation were this is causing me some headaches. In my situation there are two disabled datepickers that represent a period and there are initial values coming from query params in the URL for both of them. There is also a props passed in from the parent that determines if they should be disabled or not. This prop is also reactively used in the min-date
prop of the datepicker. So, because min-date
is not reactive there is still an "old" min-date
validation applied which is what this issue is about. So I tried to implement the workaround, but the problem is that this doesn't really work for disabled inputs. It looks like the disabled-days
callback is only called when the input it is set on changes, but since it is disabled and gets an initial value it is triggered just after mount when the "old"/invalid min-date
is still applied resulting in my form being invalid. I would think that it is at least rerun when I submit the form, but sadly this isn't the case. Otherwise it wouldn't be a problem I think. I have a reproduction based on your playground link to showcase that an invalid form can be submitted with your provided workaround.
https://formkit.link/75b2c4c96d5faa7c0d5c5cc7b147837f
First the end date is set and after that the start date is set. End date is earlier then the start date, but because the disabled-days callback is only executed when the input is changed the form can still be submitted. If it would also be executed on submit for a final check then it would result in an invalid form.
from formkit.
Related Issues (20)
- File Input FormKit element resetting bug
- Transfer List Max Not Working HOT 1
- Multiple Formkit with same schema HOT 2
- Dark mode text hard to read (select type) HOT 2
- Docs say wrong number of arguments for createInput HOT 1
- Blurred state stays false
- Hydration warnings on page refresh using Radio in a List HOT 3
- The autocomplete selection does not appear the second time HOT 5
- Make ShowMask property reactive
- Сursor jumps to the beginning of the value in the float input field while erasing
- Naked `floating-label` attribute on FormKit component does not work HOT 1
- Delay prop being overridden (to zero) by parent nodes
- Inputs break all component slots except `default` HOT 3
- `v-if` not working on messages empty object HOT 1
- FormKit Pro not synced with the current version HOT 2
- Categories in transfer list component
- Unable to use `$remove:` in a schema definition HOT 2
- Allow disabling types for default FormKit inputs HOT 1
- Custom taglist validation error only shows up when you focus out HOT 1
- Nuxt Layers and FormKit theme HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from formkit.