Home Forums Porto Admin Template FAQ’s How to change options of the Date Picker Plugin

This topic contains 0 replies, has 1 voice, and was last updated by  Support 2 years, 3 months ago. This post has been viewed 3098 times

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #10006792

    Support
    Keymaster

    Let’s say you want to change the language of the date picker to spanish:

    1) Add the locale file in the HTML

    2) Change the options:

    To change the format, you can just set it like this:

    <input type="text" data-plugin-datepicker data-plugin-options='{"format": "yy/mm/dd"}' class="form-control">

    Or change the default settings:
    (assets/javascripts/theme-custom.js)

    $.extend(theme.PluginDatePicker.defaults, {
        format: "yy/mm/dd" 
    });

    Available Options:
    http://bootstrap-datepicker.readthedocs.org/en/release/options.html


Viewing 1 post (of 1 total)