• Creator
    Topic
  • #29649
    Resolved LU
    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?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #29653
    Long 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
    LU
    Participant

    Hi

    Like this
    (removed)

    #29670
    Long 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
    LU
    Participant

    Hi
    thank you
    it works

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

    #29676
    Long Nguyen
    Moderator

    It is removed.

    Let me know if you have any questions.

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