Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #70
I've managed to place the datepicker on *five different positions: "middle-bottom", "bottom-left", "bottom-right", "left" and "right". Positioning is set as a prop, so you only need to put ´position="bottom-right"´ to set its position. When doing this, it made sense to make the button also close the datepicker, which is achieved as well. The calendar has the function to move based on viewport boundries, but since these will be set positions I've made it so that that won't happen if a position is set and defined.
I'm setting this as a draft because it might be a bit of brute forcing to get the component to line up correctly, but it seems to work with the default button and my custom one as well. Also, there's only *five positions, because I couldn't manage to do the top positions without putting in ridicously high numbers which made me believe that I did something wrong.
(I have some time now, so I can probably continue with #60 )