options for date picker?

options for date picker?

johnwillynjohnwillyn Posts: 14Questions: 0Answers: 0
edited January 2014 in Editor
Is there any way to utilize a different date picker than the jQuery UI widget? I am mostly targeting mobile devices, which have their own date widgets, and would like to default to these if possible. I also want to reduce the overall size of the app to be able to be able to go offline if possible, so not loading the fairly large UI tools would address this as well.

Thanks in advance,
JohnL

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Hi John,

    There is a Bootstrap DatePicker plug-in which uses this library: http://eternicode.github.io/bootstrap-datepicker/

    Plug-in code: https://editor.datatables.net/fields/plugins#bootstrap-datepicker

    The same method used by that plug-in could be used to include any other calendar control.

    > I am mostly targeting mobile devices, which have their own date widgets, and would like to default to these if possible.

    As in the HTML5 date picker? You could try:

    [code]
    {
    "label": "My date field",
    "name": "date",
    "opts": {
    "type": "date"
    }
    }
    [/code]

    That will extend the default `text` field type with a type of `date` . Support for it looks patchy though: http://caniuse.com/#search=date

    Thanks,
    Allan
  • johnwillynjohnwillyn Posts: 14Questions: 0Answers: 0
    Thanks Allan. I will check into the Bootstrap datepicker cuz I am using bootstrap as well. I have made a few adjustments to the bootstrap css and if I get a chance, I will clean them up and post a note about them as well. The biggest one was trying to get scrolling to work on a .modal-body, which was flakey when the modal was partially offscreen (on small screens).

    Thanks again,
    JohnL
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    That would be great - thanks!

    Allan
This discussion has been closed.