Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Disable Dates in Qwidget Date picker

Hi all,

jagan

hic

I am Using date picker in my app,

I tried to disable dates using min date and max date, but dates are not disabling.

I used below expression:

<wi-datepicker bind-qs-var="vEndDate" popup="true" default="vMaxDate" min-date="vMinDate" max-date="vMaxDate">

</wi-datepicker>

variables and load script:

CalendarTemp:

LOAD

  Max(CanonicalDate) AS DateMax,

  Min(CanonicalDate) AS DateMin

RESIDENT CalendarMaster;

LET vMaxDate = FieldValue('DateMax', 1);

LET vMinDate = FieldValue('DateMin', 1) -1; // Needed to control the minum date autogenerated in Sales table is included in the MasterCalendar

DROP TABLE CalendarTemp;

let vStartDate = Date('$(vMinDate)');

let vEndDate = Date('$(vMaxDate)');

let vYesterday = date(vMaxDate)-1;

Thanks,

Pramod

16 Replies
Anonymous
Not applicable
Author

Not applicable
Author

I went through all above discussions.

I have done same has michael torralo's example the date picker is working fine, but i am not able to disable the dates according to max and min dates.

Anonymous
Not applicable
Author

did you try with this:

Disabled Dates

Html:

<wi-datepicker bind-qs-var="vDate" popup="true" min-date="2014-10-20" max-date="2014-10-31" > </wi-datepicker>
Anonymous
Not applicable
Author

see this for details:

qWidget | Datepicker Component

Not applicable
Author

I don't want to hardcode the dates, i need max(date) if i hardcode it is working fine.

Not applicable
Author

One thing i know is this due to date formatting, Qwidget is expecting in the format  max-date="2014-10-31",

I think my date format is not matching with it.

Even though i tried with max-date="date(vMaxDate,'YYYY-MM-DD')" is not working.

Anyone help on this, where i am going wrong.

Anonymous
Not applicable
Author

may be like this:

max-date="date($(vMaxDate),'YYYY-MM-DD')"

Not applicable
Author

I tried this also not working

Anonymous
Not applicable
Author

what is this max-date??

If these are two fields:

date(max(Date),'YYYY-MM-DD') - date(Date,'YYYY-MM-DD')