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

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

Hi guys,

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

i have added publish_date field to  my calender . based on  selection am getting results its fine..

but by defaults it's showing  sept month in 1996 year ,   i am expecting it should be  current month & Year.

i used trigger also but  its working one time (when i open the application).

can you please help me on this.

9 Replies
PrashantSangle

Hi,

go to sheet property->Trigger->On Open->Add trigger -> Select in Field

then give field Name and value become = monthname(Today())

Simliar for Year Field value become Year(today())

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Hi Max,'

Can you please explain  more briefly..

actually  i tried with  trigger -->on open

i given field name and value  given as today()

but its showing only whenn i opened my application first time  . next time onwards (if i select any date and clear)

it showing 1996 year

its_anandrjs

Hi,

If you want to show only current months and year data in the calendar object then create two variables

Let vMin = MonthStart(Today());

Let vMax = MonthEnd(Today());

And in calendar properties >> select vMin variable >> and in the

Min Value >> vMin and Max Value >> vMax

But it will display current month and Year dates only dynamically

Regards

Anand

PrashantSangle

Hi,

Considering for Clear  data you have Button On which Yor are fire the Clear all trigger

then for that button also you have add above two trigger.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Hi Anand,

NO, I don't want to restrict  to only current month... if user wants he can select any date ,,

but By default it should  show current month & Year

as like below image  when user clik  the calender object .. it should show   December  2014.

cal.JPG.jpg

Thanks & Regards

Damodhar

its_anandrjs

Hi,

Then create two fields based on the current datefield which is running on your model and on the basis of that create a table to find the Min and Max dates

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

And create a variable Let vTodaysDate = Today();

And then in the calendar object use this variable vTodaysDate and in the min value MinDate and in Max MaxDate

calendarob.png

Regards

Anand

Mahamed_Qlik
Specialist
Specialist

Hey I need help;

I want calender object with month name as alphbetic in drop down of calender object.

But currently i am gettin it as numeric value as below screenshot :

Test.png

Kindly help ASAP

PrashantSangle

Hi,

If possible post your script.

Just required your variable defination script.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
ElizaF
Creator II
Creator II

Try the expressions below for the current year and month:

  =year(today(1))

  = month(today(1))

CurrentYearAndMonth.jpg

and via Actions assigned to the Document OnOpen Trigger.


Hope this helps.