How to set default value for date range picker

Hi,



I am using Date Range Picker in my application. The default value of start date is CurrDate() .

But I have to set the default value of previous week.

 For ex :- The date range should be from

22-11-2019 / 29-11-2019

How do I set it??




Thanks,

Prathmesh

 

Prathmesh Bari wrote:

Hi,



I am using Date Range Picker in my application. The default value of start date is CurrDate() .

But I have to set the default value of previous week.

 For ex :- The date range should be from

22-11-2019 / 29-11-2019

How do I set it??




Thanks,

Prathmesh

 

Hi Prathmesh,

Are you using Date Range Picker forge component in your application.

If yes, please find attached oml file. In preparation used in oml file, instead of current date, you can create new start and end date as per your requirement.

Hope it helps you.

Thanks and Regards,

Archana Gholap



Prathmesh Bari wrote:

Hi,



I am using Date Range Picker in my application. The default value of start date is CurrDate() .

But I have to set the default value of previous week.

 For ex :- The date range should be from

22-11-2019 / 29-11-2019

How do I set it??




Thanks,

Prathmesh

 

Hi Prathmesh,

You can use 

AddDays(CurrDate(),-7)


instead of CurrDate() to set the default value.

Regards

Seema

Solution

Archana Gholap wrote:

Prathmesh Bari wrote:

Hi,



I am using Date Range Picker in my application. The default value of start date is CurrDate() .

But I have to set the default value of previous week.

 For ex :- The date range should be from

22-11-2019 / 29-11-2019

How do I set it??




Thanks,

Prathmesh

 

Hi Prathmesh,

Are you using Date Range Picker forge component in your application.

If yes, please find attached oml file. In preparation used in oml file, instead of current date, you can create new start and end date as per your requirement.

Hope it helps you.

Thanks and Regards,

Archana Gholap



You can set startdate using AddDays function as 

DateToText(AddDays(CurrDate(),-6))


SyntaxEditor Code Snippet

DateToText(AddDays(CurrDate(),-6))



Solution