Problems with Datepicker Orientation

Asked

Viewed 962 times

3

I’m having trouble getting the datepicker to open down.

Follow the datepicker parameters I’m using.

$('.date').datepicker({
   format: "dd/mm/yyyy",
   todayBtn: "linked",
   forceParse: false,
   autoclose: true,
   todayHighlight: true,
   language: 'pt-BR',
   zIndexOffset: 99999999,
   orientation: 'bottom'
});

On some screens zIndexOffset has even solved my problem, but in others the field continues to "open" up.

I have cases that by removing the orientation parameter, the calendar "opens" below the field, and including the orientation parameter: 'bottom', the calendar is displayed above the field.

Ex.:

Correct would be... (Without orientation parameter)

Sem parâmetro orientation

Wrong... (With orientation parameter: 'bottom')

Com parâmetro orientation: 'bottom'

1 answer

3


If you want the DatePicker is viewed below the input, you must use:

orientation: 'top'

Should you want the DatePicker is displayed above the input, you must use:

orientation: 'bottom'

The rule is this, the parameter bottom is in relation to input. It means that the input will be as bottom. See a example here.

  • 1

    Thank you @acklay. Just before you answered, I changed it and saw it. "Noobada" mine.

  • 1

    @Rafaelweber normal! Happens! = D abs

Browser other questions tagged

You are not signed in. Login or sign up in order to post.