You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Loading Table with as default date and Searching table with a datepicker form. #76
Hi I have a table with date as a column. My requirement is,
When the page is initially loaded, the select query to the table has to send with a default date like today. and display results based on that query.
I will have a datepicker to the top of the page, where if i needed to run the query for a different date the table has to be filled with the data of that particular date.
Is it possible to achieve this with SQLPage. I tried to check with couple of examples, but couldn't find with this requirement.
will this load the data from the db based on the date selected ? because in initial load for the todays date, even though there is value, it didn't get populated.
SELECT'list'AS component, 'Events'AS title;
SELECT event_datetime AS title,
event_description as description,
'calendar'as icon
FROM events
WHERE event_datetime BETWEEN $DateANDdate($Date, '+1 day');
The code is for SQLite, you'll need to adapt the syntax if you're using a different database.
Activity
lovasoa commentedon Aug 30, 2023
I made a small example: https://replit.com/@pimaj62145/SQLPage-Time-series-example?v=1
let me know if it helps
althaf004 commentedon Aug 30, 2023
will this load the data from the db based on the date selected ? because in initial load for the todays date, even though there is value, it didn't get populated.
lovasoa commentedon Aug 30, 2023
Yes, look at the code!
The code is for SQLite, you'll need to adapt the syntax if you're using a different database.
althaf004 commentedon Aug 30, 2023
yes i`m using postgresql.
lovasoa commentedon Aug 30, 2023
You'll have to use postgres date and time functions, then.