How to position grid initially to today()

I have reservations with a date key.
I need to be able to move to any date, but initially the grid should show me the entries around today.

Hi
yo can add to your sql: order by date desc
you’ll see firstly today records

In your sql box on the grid, add [add_sql] right before the order by part.

then you can set that [add_sql] session var on your on script init or on a previous page.
[add_sql] = " AND datefield BETWEEN date1,date2" ;//for example

Thank you nwdbs.

I need to explain more precisely: I have several pages of records ordered by datetime. Now I would like to be positioned at the date , as you propose. But I want to be able to scroll to earlier or later dates.
How to organise this?

I Have the same problem

Create two buttons: Back and Forward and drop them in your Toolbar.
Make them PHP buttons.
Have each button set the Date1 and Date2 dates for the Previous or Next Month.
Set a Session : [add_sql]
Then have that in the Sql of your grind in the WHERE statement…
And at login… default [add_sql] to have your current month or week… or whatever.

1 Like

I will try it
Thank you very much