react-admin
react-admin copied to clipboard
SelectInput, DateInput and DateField
Hi all,
First, I really want to say thank you. This tool is amazing to me.
And it would be better if we can
- Support 'format' attribute for DateInput and DateField, eg dd/mm/yyyy instead of default mm/dd/yyyy.
- DateInput should be able to clean in filter. Now I cannot clean the value to display all after choose any date to filter
- SelectInput should be available in filter so that user can filter by category instead of typing text.
- Default value should be available as well for fields in filter section, so that at the first loading time, we can see filter records. Such as user can see products are sold today, not the whole week/month.
I hope that my proposal can make more and more user to use this fantastic 'admin-on-rest'.
Thank you very much.
Hi,
And thanks for your kind words.
- While we can support more DateTimeFormat options, supporting a
formatattribute for dates is outside the scope of admin-on-rest. I invite you to create your own components based onmoment.js. - "DateInput should be able to clean in filter" you can remove the filter, what more do you want?
<SelectInput>is already available in filters. Why doesn't it work for you? See for instance how the blog example uses the<ReferenceInput>in a filter: https://github.com/marmelab/admin-on-rest/blob/8b5118b1e7e5a1a3cb13f703ce3526d36a885bef/example/comments.js#L16-L18- As for the default filter, that's a good idea, please open another issue for this one. Note that it's already possible to fix them by adding query parameters, so if you hack the Menu API you can, technically, link to a prefiltered request.
Thank you, fzaninotto.
hi, it's the support format solved?