altPosition not work correctly
nipanimaju opened this issue · 6 comments
If is enought space in the top Datepicker recalculate top position, when is enought space in the bottom Datepicker take my custom 'top' position.
code:
<Datepicker v-else-if="getInputType(name) == 'date'"
v-model="gObject[name]"
autoPosition="false"
:altPosition="() => { return { top: '80px', left: '50%', transform: 'translateX(-50%)' } }"
:enableTimePicker="false"
:placeholder="dateConvert(name, value)"
@closed="dateWithoutTime(gObject[name], name)"
:locale="$i18n.locale"
hideInputIcon/>
I just got the time to take a deeper look, I am not sure what is happening, can you explain a little bit better?
<Datepicker v-else-if="getInputType(name) == 'date'"
v-model="gObject[name]"
:enableTimePicker="false"
autoPosition="false"
:altPosition="() => { return { top: '80px', left: '50%', transform: 'translateX(-50%)' } }"
:placeholder="dateConvert(name, value)"
@closed="dateWithoutTime(gObject[name], name)"
:locale="$i18n.locale"
teleport=".table-nav"
hideInputIcon/>
Datepicker is created dynamicly in table with another input fields (text, number). All this fields are in wrapper .table-nav where ist set teleport, this ist scrollable div with height auto. On Large screen everything is fine i dont need altPosition, but on mobile i need to show Datapicker in the midle on screen and there i added altPosition. When Datepicker field is at the top of the application in css property is my custom top: 80px, but when Datepicker field is at the bottom my custom pos is ignored (or recalculate?) is 350px sometimes 500px. Screen one - everyting ok, sceen two - not. Red square shows the current position of the Datapicker field
Tnx, I know what is causing it, will be fixed
I have updated the package but the problem persists
// edit: i forgot to set autoposition = false, work good, thx