Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calendar Object

Hi,

I define Min Value = Today() - 365  and the Max Value = Today() + 365.

I want the object open with the date = Today()?

Is there a way to set an default date to the Calendar Object?


Is possible?


Regards,
Nuno Maximiano

10 Replies
richard_chilvers
Specialist
Specialist

Hi

The Calendar Object requires you to select a variable or field in the General tab.

I believe the Calendar then opens on the date currently held in that field.

So perhaps you need to use a trigger to populate your variable whenever the Calendar is activated? You can use the Triggers tab on the Sheet Properties for this.

I hope that helps.

Not applicable
Author

But, how i define this?

- Min Value = Today() - 365 
- Max Value = Today() + 365
- Default Value = Today()


Regards

richard_chilvers
Specialist
Specialist

  • right-click the Calendar Object
  • select Properties
  • select the General tab
  • select Variable and choose from the drop-down
  • you can now access the Min Value and Max Value - you will see that these can be expressions.

If this helps you, let me know. The default value may be a little more tricky

Not applicable
Author

When the question arose had defined Variables, The Min Value, The Max Values.

The question is: How a define de default value?

Regards.

richard_chilvers
Specialist
Specialist

You will need to create a variable. Call it Date_Today. Set it equal to Today().

In the Properties I explained above, use this variable for your Calendar. When you use your Calendar, the default will be today. And you can select any date up to 12 months before or ahead.

Regards

Not applicable
Author

Hi,

I can't use the variable Date_Today because i use another variable to register the selected of the user.

Sometimes this variable has value and the calendar open in the date of the variable -> Ok

The problem is when the varible don't have value (the user can or not) fill the date.
Then, i can't do Today() for my variable.

When my variable is null i want the calendar open with default value = Today. Is possible?


Regards

richard_chilvers
Specialist
Specialist

Hi Nuno

OK. I do not understand everything about your application. But perhaps, when you create the date variable, you set it to have Today() as its default value. If the user changes this, the Calendar object will use that date, otherwise it will use Today().

Does this help?

Regards

Richard

richard_chilvers
Specialist
Specialist

You may also want to look at this earlier entry on the forum:

http://community.qlik.com/message/36557#36557

Not applicable
Author

I had this idea: " If the user changes this, the Calendar object will use that date, otherwise it will use Today()."

But have one problem, if the user want Today(), he see that the field date have Today() and save the record.

I don't know if the record is to save with date = Today() or not.

Any ideas?

Regard