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

Support for Date range picker #340

Open
GregoireBailly opened this issue Feb 15, 2022 · 2 comments
Open

Support for Date range picker #340

GregoireBailly opened this issue Feb 15, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@GregoireBailly
Copy link

Hi,

I'd like to use vjsf to get a date range picker (https://vuetifyjs.com/en/components/date-pickers/#range).

I tried using "x-props": {"range": true} but it's not changing anything (in the same spot "x-props": { "outlined": true } is working properly).

I guess when using the type string with format date, the props are only passed through to and not to .

Does anyone know about this issue ? Is there anyway to implement a quick work-around ?

Here is part of my json file :
"properties": { "periode": { "title": "Période", "type": "string", "format": "date", "description": "Période pour laquelle on saisit la consommation", "x-props": {"range": true} },

@albanm
Copy link
Member

albanm commented Feb 15, 2022

I think the problem is more complicated than passing the prop to the right component. Your model would be invalid here as the range mode of the date-picker would return an array while you declare a simple string with date format.

I will add this to the roadmap, but I don't know when I will have time to work on it.

In the meantime you could use advanced slot integration https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/examples#slots-wrappers

@albanm albanm self-assigned this Feb 15, 2022
@albanm albanm added the enhancement New feature or request label Feb 15, 2022
@GregoireBailly
Copy link
Author

Ok, thanks a lot for the quick answer :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants