Open tirdadc opened 7 years ago
I currently have a setup with two fields, #start_date and #end_date.
When selecting a start date, I set the end_date's start date using set startDate, and vice versa for the end date field.
set startDate
I am trying to clear all these settings with this code, but it still shows shading in the calendar popup after all of these steps:
$('#start_date').val(''); $('#end_date').val(''); $('#start_date').calendar('clear'); $('#start_date').calendar('set endDate', undefined); $('#start_date').calendar('set focusDate', undefined); $('#start_date').calendar('refresh'); $('#end_date').calendar('clear'); $('#end_date').calendar('set startDate', undefined); $('#end_date').calendar('set focusDate', undefined); $('#end_date').calendar('refresh');
I expect this for my start date calendar popup when I reset these things:
but I end up with this:
What's missing? Neither set focusDate nor clear seem to do what I need them to do here.
set focusDate
clear
Your example code works for me, see https://jsbin.com/lasoqomose/edit?html,js,output. Could you please provide a JSBin that reproduces the issue?
I currently have a setup with two fields, #start_date and #end_date.
When selecting a start date, I set the end_date's start date using
set startDate
, and vice versa for the end date field.I am trying to clear all these settings with this code, but it still shows shading in the calendar popup after all of these steps:
I expect this for my start date calendar popup when I reset these things:
but I end up with this:
What's missing? Neither
set focusDate
norclear
seem to do what I need them to do here.