Is it possible to set a direction for the Kendo Da

2019-07-12 15:03发布

问题:

I have a calendar input on the bottom of a form.

When the user clicks on it, the calendar pops up bellow the input creating scroll bars.

Is there any way I can set the direction that a DatePicker will open?

For instance... left, right, above?

Here's my code:

$("#dpBirthDate").kendoDatePicker();

Thanks

回答1:

Yes and no. You can edit the popup origin and position like this:

$("#date").kendoDatePicker({
    origin: "top left",
    position: "bottom left",
    animation: {
        open: {
            effects: "slideIn:up"
        }
    }
});

That should make it open upwards, but I can't seem to get it to work in a jsFiddle. Setting the position to bottom + anything always causes it to go back below the input box, as if top was specified. I can get it to show below or to the side, but not above. Not sure if it is a bug or what...