Best format for setting Date Input value


Adrian Brookbank
Am saving a date record in reports, BUT having a little trouble on date picker filtering it. That's what am using to save
and to filter reports. - How can you set the Date Picker to a specific date eg 'Today's Date'?
- I don't think I've got that format correct for picker to filter report by my original date format. Thanks!

DecSoft

Hello Adrian,

At a first view, the below is not exactly correct:

We must set the [Report1.Query] variable directly with [Date], using a SetVar action.

Maybe this is not especifically the "problem", but please, try the above, Adrian.



DecSoft

Hello again, Adrian,

On the other hand, maybe you need to place in the "[Report1.Query]" variable the date... but not an object. Maybe directly something like this:



Adrian Brookbank
Is there also a way to set the 'Date picker object' to a specific date (from a button)

DecSoft

Hello Adrian,

The point is that I am not sure about what data picker we are talking about, sorry... can you detail it a bit more?



Adrian Brookbank
sorry my fault David... 'Date input control'

DecSoft

Hello Adrian,

The input date is a bit particular. Certainly, we can do what you wanted, just with a code like the below one:

The above code set the date of a date input to 2018-12-14, tomorrow at this time. You can take a look at the "DateInput" sample. Also take a look at the "DateTime" sample.

Not only me (the Mozilla documentation refer it too) prefer to use something like the "DateInput" sample, that is, provide three Select controls for years, months and days, instead of deal with the date input particularities.


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.