Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
alkesh_sharma
Creator III
Creator III

Issues With Calender Object

Hello All,

As client's Requirement I need to give him two calender objects to so that he can select date range.

The issues with the calender object is that, if user selects oct 1, 2014 and if this date is not available in the data set (Transactions tables)  the selection shows null. The user have to again open the calender object and select the date again.

Is there any way that only available dates are highlighted in the calender object and rest grayed out.

Or is there any other alternative which I can give him? apart from slider object..

Please help guys, Its kinda urgent.

9 Replies
m_woolf
Master II
Master II

Create a Master Calendar that has all the dates in the data set.

Not applicable

Hi,

Could you post a sample if possible?

alkesh_sharma
Creator III
Creator III
Author

Could You explain this a lil.

The master calender I am Using is the one recommended by Qlikview

QuartersMap: 

MAPPING LOAD  

rowno() as Month, 

'Q' & Ceil (rowno()/3) as Quarter 

AUTOGENERATE (12); 

 

Temp: 

Load 

               min(%MasterDate) as minDate, 

               max(%MasterDate) as maxDate 

Resident AR_AGEING; 

 

Let varMinDate = Num(Peek('minDate', 0, 'Temp')); 

Let varMaxDate = Num(Peek('maxDate', 0, 'Temp')); 

DROP Table Temp; 

 

TempCalendar: 

LOAD 

               $(varMinDate) + Iterno()-1 As Num, 

               Date($(varMinDate) + IterNo() - 1) as %MasterDate 

               AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate); 

 

MasterCalendar: 

Load 

               %MasterDate AS %MasterDate, 

               week(%MasterDate) As Week, 

               Year(%MasterDate) As Year, 

               Month(%MasterDate) As Month, 

               Day(%MasterDate) As Day, 

               YeartoDate(%MasterDate)*-1 as CurYTDFlag, 

               YeartoDate(%MasterDate,-1)*-1 as LastYTDFlag, 

               inyear(%MasterDate, Monthstart($(varMaxDate)),-1) as RC12, 

               date(monthstart(%MasterDate), 'MMM-YYYY') as MonthYear, 

               ApplyMap('QuartersMap', month(%MasterDate), Null()) as Quarter, 

               Week(weekstart(%MasterDate)) & '-' & WeekYear(%MasterDate) as WeekYear, 

               WeekDay(%MasterDate) as WeekDay 

Resident TempCalendar 

Order By %MasterDate ASC; 

Drop Table TempCalendar; 

alkesh_sharma
Creator III
Creator III
Author

I am Using that only, Only the dates that are available in the Data Set. But while creating the calender Object, I have used my master date field so it should give me only the dates available in the data set. but that is not the case.

Can you give  share me a qvw?

m_woolf
Master II
Master II

You need to set the calendar objects min and max values to the min and max dates in the dataset. Then the users will not be able to select dates outside of that range.

alkesh_sharma
Creator III
Creator III
Author

Please refer to the attached qvw.

In this my min date is 22-06-2011 but the calender object shows all dates in June, If I select 1st June 2011 from calender there is no selection. only if I select the date available in my data set i.e 22-06-2011, than only the selection works.

I want that not available dates should be grayed out.

alkesh_sharma
Creator III
Creator III
Author

I guess you did not get what I want.

Please refer to the attached qvw.

In this my min date is 22-06-2011 but the calender object shows all dates in June, If I select 1st June 2011 from calender there is no selection. only if I select the date available in my data set i.e 22-06-2011, than only the selection works.

I want that not available dates should be grayed out.

m_woolf
Master II
Master II

I don't believe it is possible to grey out non-selectable calendar dates. Why not put a text box above the calendar that says what the minimum and maximum dates are? Then if the user still clicks on a non-selectable date, the result should be expected.