In the React-Day-Picker project, is there a way to change the position of the DayPicker popup? I have a DayPickerInput on the far right of my view, and the DayPicker then opens left aligned with the Input, but this makes the DayPicker get cropped by the edge of my window.
Is there a way to make the DayPicker be right aligned with the Input and have it overflow to the left, so that it won't get cut off by the edge of my window?
Right now it looks like this
(the dots are the input)
....._____
| |
| |
| |
|_________|
and I want it to look like this
_____.....
| |
| |
| |
|_________|
After some struggle I managed to reproduce partially the markup of the datepicker, with some dummy content inside:
This way we can see the styles that are being applied to the datepicker. So, with some overrides in the CSS we can achieve the desired result:
Hope this helps :)
Related
I am using below code to animate my slider menu as there is no proper example of ionic menu controller for react.
<CreateAnimation
play={isLoaded}
duration={500}
fromTo={[
{ property: 'transform', fromValue: animateFrom, toValue: animateTo }
]}>
...my slider UI
</CreateAnimation>
The problem is, it's working fine for first time. but after that It doesn't even after my component re renders.
https://ionicframework.com/docs/cli/commands/start
sidemenu - A starting project with a side menu with navigation in the content area
Starters for #ionic/react (--type=react)
name | description
--------------------------------------------------------------------------------------
blank | A blank starter project
list | A starting project with a list
my-first-app | An example application that builds a camera with gallery
sidemenu | A starting project with a side menu with navigation in the content area
tabs | A starting project with a simple tabbed interface
conference | A kitchen-sink application that shows off all Ionic has to offer
I've spent a while trying to formulate this question online without success. My problem is that when I click ui-select-choices rendered by angularjs ui-select-choices, the list opens fine down, but when I have devtools up (and when the browser is less than certain width), the options open upward and temporarily trigger the showing of vertical scroll bar. It is present for milliseconds but is causing a jerk on page.
Tried setting max-height to ul and li without success. I can put an overflow: y but I don't like seeing the scrollbar.
My solution is a workaround: add "limitTo:" in the repeat to limit the amount of results displayed. Doing this keeps the display beneath the dropdown rather than above (limiting amount to a certain quantity gives me the ability to match how much room I have left on page)
<ui-select-choices repeat="item in $ctrl.data | filter: $select.search | limitTo: 6">
<span ng-bind-html="item | highlight : $select.search"></span>
</ui-select-choices>
I'm going to do automation test on this scenario: when hover the mouse on the button, there will be a float menu. And I want to check the logo in the float menu.
By default, it is:
<div class="header fold">
<div class="logo fold">
...
When hover the mouse on the button, the page will turn to:
<div class="header float-header">
<div class="logo float-header">
...
I tried this command:
mouse over | css=div.header-status-btn[title="Restore the header"]
page should contain element | css=div.logo.float-header
But there is always errors:
FAIL : ValueError: Element locator 'css=div.logo.float-header' did not
match any elements.
Seems it can't locate the element in floating menu in this way.
Anyone know how to check the float menu with mouse over?
Try this:
Mouse Over | css=div.header-status-btn[title="Restore the header"]
# wait up to 60s for element to become visible
Set Selenium Implicit Wait | 60
Wait Until Element Is Visible | css=div.logo.float-header
I often use the following layout whilst working. My issue is that I can't seem to resize the Main window located in the center. I know the hot keys required to do so, however am still unable to accomplish this. I am able to resize panels 1, 2, 3, and 4, but only horizontally.
--------------------------
| 1 | | 3 |
|-----| Main |-----|
| 2 | | 4 |
--------------------------
How can resize the Main panel vertically?
I am using the a tool provided by saucelabs to create a user test.
I have a div containing an image and when you hover over it a box displaying where your magnifying appears and that area is then displayed to the right
The aim of the test is to verify when a user hovers over my main image a second div is displayed showing a magnified version of that image
So far I have created a test that passes but while I can see the magnification area over the image there is no image being displayed to the right of that. So in my eyes thats failing
Why is the test passing if the image is not being displayed?
NB
My last command is waitForVisible (which passes) and reading the documentation it states
Determines if the specified element is visible. An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one of its ancestors. This method will fail if the element is not present.
I'm not familiar with saucelabs nor their tool you mention, but I use RobotFramework + Selenium and I believe they are very alike.
Your problem may be because you are testing the visibility of your popup div only, add a new test just after that to test the visibility of the image to the right.
I would use something like this (please change the command names as needed):
...
Mouse Over | {locator of the element triggering the popup}
Wait Until Element Is Visible | {locator of the div with the magnified area}
Element Should Be Visible | {locator of the magnified image to the right}
Mouse Out | {locator of the element triggering the popup}
Element Should Not Be Visible | {locator of the div with the magnified area}
Element Should Not Be Visible | {locator of the magnified image to the right}
...
This way we first trigger the popup by hovering the image, then we wait for and assert the magnified area delimiter over the image, then we assert the magnified image itself to the right, then we make sure everything is back to normal when we remove the mouse pointer from the image.