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

e.date bug #135

Closed
dudo opened this issue Jan 21, 2014 · 9 comments
Closed

e.date bug #135

dudo opened this issue Jan 21, 2014 · 9 comments
Milestone

Comments

@dudo
Copy link

dudo commented Jan 21, 2014

$('#dateRange1').on("change.dp",function (e) {
  $('#dateRange2').data("DateTimePicker").setStartDate(e.date);
  if ( !$('#dateRange2 input').val() ) {
    $('#dateRange2').data("DateTimePicker").setDate(e.date);
  }
});
$('#dateRange2').on("change.dp",function (e) {
  $('#dateRange1').data("DateTimePicker").setEndDate(e.date);
  if ( !$('#dateRange1 input').val() ) {
    $('#dateRange1').data("DateTimePicker").setDate(e.date);
  }
});

This is with version 2.1.20 and moment 2.4.0. e.date is returning today's date. This is happening on your example page as well - http://eonasdan.github.io/bootstrap-datetimepicker/#example8

Also, is there a better way to check to see if the date is not selected? I'm using the height property, but it seems a bit overkill.

@Eonasdan
Copy link
Owner

I don't see the problem you're having with change.dp. It's possible that a recent update has fixed that.

You can check to see for a date by doing this $('#datetimepicker1 input').val();

@dudo
Copy link
Author

dudo commented Jan 23, 2014

No... check out the preview site. pick a date for the start date of Jan 2. Then go over to the end date. You'll see that the dates are greyed out at today's date, instead of from the 2nd.

@Eonasdan
Copy link
Owner

Yup. You're right despite that I just looked at it and thought it wasn't doing that it is. More coffee?

@dudo
Copy link
Author

dudo commented Jan 23, 2014

Don't mind if I do. Black is fine.

@Eonasdan
Copy link
Owner

Check out the staging branch.

Please let me know if your issue has been resolved.

@dudo
Copy link
Author

dudo commented Jan 23, 2014

Works great!

@dudo
Copy link
Author

dudo commented Jan 23, 2014

While I have you, if you don't mind... I'm not sure where this issue would fall, with you, or with bootstrap itself.

button width

If I uncheck:

.glyphicon:empty {
  width: 1em;
}

it shows up fine, but by default, I have tiny buttons for my time. Any idea why bootstrap is thinking that' my glyphicon is empty??

@Eonasdan
Copy link
Owner

Can you try using Font Awesome? This at least might help use figure out if this is the plugins issue or bootstraps

@Eonasdan
Copy link
Owner

since I believe the original issue is fixed, I'm going to close this one. You're welcome to start a new issue

Eonasdan added a commit that referenced this issue Jan 25, 2014
Important! build.less file name has been been changed to
bootstrap-datetimepicker-build.less to prevent collisions

Fix for #135: setStartDate and setEndDate should now properly set.
Fix for #133: Typed in date now respects en/disabled dates
Fix for #132: En/disable picker function works again
Fix for #117, #119, #128, #121: double event change event issues should
be fixed
Fix for #112: change function no longer sets the input to a blank value
if the passed in date is invalid

Enhancement for #103: Increated the z-index of the widget
@ghost ghost locked and limited conversation to collaborators Jun 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants