Search code examples
javascriptjquerycssfuelux

FuelUX - Open datepicker calendar upward


What is the best way to open the datepicker calendar upwards? The default is to open downwards. I have changed the margin to a negative value on datepicker-calendar-wrapper class and it works fine, but wondering if theres any other way to do this.

JSFiddle

.datepicker-calendar-open-up {
    margin: -356px 0 0;
}

Solution

  • Add dropup class to datepicker wrapper.

    <div class="datapicker dropup">
        ...
    </div>
    

    http://jsfiddle.net/nvrfat1y/1/

    The datepicker is is built around bootstrap dropdowns control which includes a dropup variation.

    http://getbootstrap.com/components/#btn-dropdowns-dropup