Disable time on datetime field

Disable time on datetime field

minobuminobu Posts: 23Questions: 8Answers: 2

Hi,

I have a datetime field that uses the editor datepicker.

                          {

                        "label": "Deployment date",
                        "name": "date_arrived",
                        type:'datetime',
                        format: 'd-m-Y',


                    },

If i remove the format option only the Datepicker is visible when a client clicks on the date field. However as soon as i add the format option to format the the selected date, the hours and minutes dialog is also visible. How do i disable the Hours and minutes and only show the datepicker. Thanks.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 65,863Questions: 1Answers: 10,957 Site admin
    Answer ✓

    I think you want format: 'D-M-Y', (example).

    In Moment.JS m is minutes. The full list of their parameters is available here.

    Allan

  • minobuminobu Posts: 23Questions: 8Answers: 2

    Thanks, Allan, that worked.

This discussion has been closed.