Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'clear' behavior doesn't unset shaded range in popup #65

Open
tirdadc opened this issue Mar 29, 2017 · 1 comment
Open

'clear' behavior doesn't unset shaded range in popup #65

tirdadc opened this issue Mar 29, 2017 · 1 comment

Comments

@tirdadc
Copy link

tirdadc commented Mar 29, 2017

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:

$('#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:

screen shot 2017-03-29 at 2 21 50 pm

but I end up with this:

screen shot 2017-03-29 at 2 22 07 pm

What's missing? Neither set focusDate nor clear seem to do what I need them to do here.

@mdehoog
Copy link
Owner

mdehoog commented Apr 9, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants