Get datepicker range
Posted: Tue Apr 23, 2024 1:20 am
Hello!
First off, apologies if this has been asked elsewhere, I have searched and searched for the past 24 hours and got nowhere.
I have very simple dashboard connecting to a json (in php) script.
Ideally I want to send some parameters to the json URL based on my ranged date picker (called DatePicker1):
Something like: /myjson.php?DateRange=[range]
Now, I believe I can update the data source pragmatically and just re-sync (although if anyone wants to provide code, it would certainly help), but what I am really struggling with is getting the values of DatePicker1 both initially and whenever it's changed by the end user.
I've tried all sorts of permutations of getComponentByName but I am not able to get anything to work.
Is anyone able to help at all with some example JS code?
Many thanks in advance!
First off, apologies if this has been asked elsewhere, I have searched and searched for the past 24 hours and got nowhere.
I have very simple dashboard connecting to a json (in php) script.
Ideally I want to send some parameters to the json URL based on my ranged date picker (called DatePicker1):
Something like: /myjson.php?DateRange=[range]
Now, I believe I can update the data source pragmatically and just re-sync (although if anyone wants to provide code, it would certainly help), but what I am really struggling with is getting the values of DatePicker1 both initially and whenever it's changed by the end user.
I've tried all sorts of permutations of getComponentByName but I am not able to get anything to work.
Is anyone able to help at all with some example JS code?
Many thanks in advance!