i'm trying to disable future / earlier than 3 years date selections for the date fields filters.
is there any way i can achieve that?
something like:
"timestamp": {
"type": "date string",
"mindate": DATE,
"maxdate": DATE
}
Thanks.
Hello, Menachem!
Thank you for reaching out to us.
Kindly note that Flexmonster does not support disabling the selection of certain members from the filter UI. However, a similar result in limiting the date selection can be achieved by prefiltering the data before passing it to the component. This functionality can be implemented for the custom API data source by adding the date limit parameters to the customizeAPIRequest
function. This way, you could send min and max dates to the custom API server and filter the data before returning it to the client.
We have prepared a JSFiddle example to illustrate the idea: https://jsfiddle.net/flexmonster/94kthagx/
Please let us know if such an approach would work for you.
Best Regards,
Maksym
Hello, Menachem!
Hope you are doing well.
We are wondering if you had time to test the suggested approach for restricting the date range with custom API.
Please let us know if this solution works for you.
Best Regards,
Maksym
Hello
yes. it did work for me and i can filter the data.
Although, i had to come up with a way to let the user know they can't look for dates before / after a specific date.
Thanks.
Hello, Menachem!
Thank you for your feedback.
We are glad to hear that the suggested approach worked for you.
Feel free to contact us if any additional questions arise.
Best Regards,
Maksym