Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

by default current month & year should be in my calendar object

need help to get default  current month and year in my calendar object..

when i am opening calendar it is showing Jan 2012 but i need Feb 2015(current)

11 Replies
mightyqlikers
Creator III
Creator III

Hi,

go to sheet properties

triggers tab

action on activesheet

select in field

there in give the datefieldname and values as max ( datefield)

Regards

Samwise


Anonymous
Not applicable
Author

png.PNG

Anonymous
Not applicable
Author

If you make a selection, like Feb 2015, then close [save changes if requested] & reopen the qvw it should remember the selection.

Could you try & see if it does ?

Anonymous
Not applicable
Author

default i want to show current month and year ..actually the data from 2012 so when i click on calendar object it is showing default Jan 2012..

is there any option to apply triggers??

Anonymous
Not applicable
Author

Hi,

If you want to show only current months and year data in the calendar object

Create two variables

Let vMin = MonthStart(Today());

Let vMax = MonthEnd(Today());

Goto calendar object properties

Next select vMin variable

In the Min Value assign vMin and

Max Value assign vMax

Dynamically it will display current Month and Year dates.

OR

If you don't want to restrict  to only to current month and year.So user can select any date.

By default calendar object  should  show current month & Year

Create two fields based on the Datefield which is present in your model and on the basis of that create a table to find the Min and Max dates

LOAD Date(Min(Date)) as MinDate, date(Max(Date)) as MaxDate Resident Table;

Next create a variable Let vTodaysDate = Today();

And In the calendar object use this variable vTodaysDate.

In the min value  assign MinDate and in Max  assign MaxDate

calendarob.png

Hope this helps

Regards

Neetha

Anonymous
Not applicable
Author

You can use triggers, but do beware that some triggers do not work ion the Ajax client, especially Select triggers On Open which I why I avoid using them for things like this.

The annoying thing about this is that On Open triggers can all appear ok in the Desktop but then stop working in WebView / Ajax.

did have a look to see if you make a selection, like Feb 2015, then close [save changes if requested] & reopen the qvw it then remembers the selection

Anonymous
Not applicable
Author

I tried but it's not working...

Anonymous
Not applicable
Author

Could you share a sample qvw ?

Anonymous
Not applicable
Author

it was a huge file i can't able to share you ...is there any other way to share??