Datetime picker head

Support MB Frontend Submission Datetime picker headResolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #29649
    LULU
    Participant

    Hi

    Do you know why my datetime pick head not like your sample?

    Yours
    https://docs.metabox.io/fields/datetime/

    Mine is just like two dropdown selector for Y and M?

    #29653
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Can you please share some screenshots of the datetime picker on your side? And the code that creates the field.

    You can change the display of datetime picker by using the setting js_options. Get more details on the documentation https://docs.metabox.io/fields/datetime/#settings

    #29655
    LULU
    Participant

    Hi

    Like this
    (removed)

    #29670
    Long NguyenLong Nguyen
    Moderator

    Hi,

    The default settings changeMonth and changeYear are set to true. You can change them to false by using the code

    'fields' => [
        [
            'name'       => __( 'Date', 'your-text-domain' ),
            'id'         => $prefix . 'date_90l222y2yyt',
            'type'       => 'datetime',
            'js_options' => [
                'changeMonth' => false,
                'changeYear'  => false,
            ],
        ],
    ],

    Or Date Picker Options in the Builder https://share.getcloudapp.com/L1uBmwDw

    Get more details here https://api.jqueryui.com/datepicker/#option-changeMonth

    #29672
    LULU
    Participant

    Hi
    thank you
    it works

    could you help me to remove the image url?
    thank you

    #29676
    Long NguyenLong Nguyen
    Moderator

    It is removed.

    Let me know if you have any questions.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.