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

[BUG] Switching to time picker produces unpleasant visual effect on resize #154

Closed
temuri416 opened this issue Jan 29, 2014 · 3 comments
Closed
Milestone

Comments

@temuri416
Copy link

Hi,

In FF or Chrome:

  1. Open http://eonasdan.github.io/bootstrap-datetimepicker/#example1
  2. Display the datepicker
  3. Click CLOCK icon

You will notice that when animation stops, the bottom suddenly moves up by 15px or so.

Would it be possible to:

  1. Have a switch to disable animation, which will make the transition to new height seamless;
  2. Adjust the resize when animation is on.

Thanks for the wonderful widget!

@temuri416
Copy link
Author

A switch to disable animation would be grand.

@Kenny-Moore
Copy link

There appears to be a mistake in a css rule causing this jump in the animation. There is a rule targeting the table cells that contain the time-picker up/down arrow buttons. This rule is supposed to set the padding on these cells to 0px but the rule only targets the buttons when the class "in" is on the time-picker list element which is assigned after the animation completes. Thus during the animation there is extra padding which disappears after the animation is complete.

To fix this the rule needs to be changed from:
.bootstrap-datetimepicker-widget ul.list-unstyled li.in div.timepicker div.timepicker-picker table.table-condensed tbody > tr > td
{
padding: 0px !important;
}

To this:
.bootstrap-datetimepicker-widget ul.list-unstyled li div.timepicker div.timepicker-picker table.table-condensed tbody > tr > td
{
padding: 0px !important;
}

Also, I would like to take this time to point out that table elements should not be used to layout the elements of the time-picker control.

@Eonasdan Eonasdan modified the milestone: 3.0.0 Mar 3, 2014
Eonasdan added a commit that referenced this issue Mar 3, 2014
## 3.0.0
## **Breaking changes in this update! Pay attention!!**
* Fix for #170, #179, #183: Changed event to `dp.-` options load as
`data-date-OPTION` instead of `data-OPTION`. This should fix the double
change event firing.
* Fix for #192: `setDate` now fires `dp.change`
* Fix for #182: Picker will **not** set the default date if the input
field has a value
* Fix for #169: Seconds doesn't get reset when changing the date (Thanks
to PR #174)
* Fix for #168 z-index fix for BS modal
* Fix for #155 Picker properly displays the active year and month
* Fix for #154 CSS update to fix the collapse jump
* Fix for #150 and #75 `minViewMode` and `viewMode` work properly
* Fix for #44 Finally! It's here!! Thanks to @ruiwei and his code on
#210 picker will adjust the positioning of the widget.

#### **Manually merged PR**
* #178 When using `minuteStepping` the minute select grid will only show
available steppings
* #195, #197 Using the `data-OPTION` has been changed to
`data-date-OPTION`. These options are expected to be on the
`input-group` if you're using the `form-group` **or** the input field
* #184 The option `sideBySide` change be used to display both the d and
the timepicker side by side

#### **Other Changes**
* Changed picker width to 300px if using seconds and am/pm
* Added option `useCurrent`, thanks to @ruiwei. When true, picker will
set the value to the current date/time (respects picker's format)
* Added option `showToday`, thanks to @ruiwei. When true, picker will
display a small arrow to indicate today's date.
* Changed `startDate` to `minDate` and `endDate` to `maxDate` to make it
more clear what these options do.
@Eonasdan
Copy link
Owner

Eonasdan commented Mar 3, 2014

Please check the Staging branch to verify your issue(s) have been resolved.

@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

3 participants