Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
WojinRina
Contributor
Contributor

Can datepicker on calendar object choose closest valid date?

Hi, using the calendar object for the first time and it seems to be working well with the exception of the date picker. If I select a date on the date picker that doesn't have any orders, there is no selection. Is there a way I can modify this behaviour so that the closest valid date is selected?

1 Reply
Andrei_Cusnir
Specialist
Specialist

Hello,

 

If my understanding is correct, you have a dataset with orders and order dates. You are trying to use Date picker object and you have noticed that you can't select date where there are no any orders. To be more specific you have the following use case scenario:

 

You have a dataset such as:

 

You have loaded the data into Qlik Sense:

 

You are trying to select dates with Date picker object, but only the dates with orders are selectable:

 

However, you would like to select the date e.g. 23rd of September (which doesn't have an order) and the date 22nd of September (Which is the closest one) will be selected. If I have misunderstood the use case scenario, please elaborate in detail by providing further information.

 

In this case Qlik Sense is working as designed and since your dataset doesn't have data for the other dates, you can't select those dates. If you want to make the other dates selectable, then you will have to create another table as master calendar, which will hold all possible dates within a range. Then you can use that field for Date picker and you will be able to choose other dates as well. If your orders fall within the selected range then they will be displayed on the visualizations, otherwise if you select date range where no orders were placed, the visualizations will not show any data.

 

I hope that this information was helpful.

 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂