lovasoa / SQLpage

SQL-only webapp builder, empowering data analysts to build websites and applications quickly
https://sql.datapage.app
MIT License
1.29k stars 69 forks source link

How to set Form type date to current date or start of week #70

Closed jahelo closed 1 year ago

jahelo commented 1 year ago

Is there a built-in way to set a control of type date to e.g. the current date?

I did not find it in the documentation. I found the possibility to set it to a specific date, but i would like to be able to set it to the current date or start of the week etc.

lovasoa commented 1 year ago

You can use your databases native functions for that. What database are you using?

lovasoa commented 1 year ago

Here is an example with SQLite :

select 'form' as component;
select 'date' as type, date('now') as value;

image