How does the Elementui date-time selector component limit the time range to "before this moment"?

it is hoped that the DateTimePicker date-time selector can limit both time and date, as shown in figure
"date limit": so that users can only choose before today (including today)
"time limit": so that users can only choose a point in time before "now"

check the document:
DateTimePicker component, the properties in the provided Picker Options: disabledDate settings are as follows

disabledDate(time) {
    return time.getTime() > Date.now();  
},

but cannot limit time

I hope to find a way to limit both time and date:
for example, it is 2018-11-27 20:42:00
you can only choose a time before 20:42:00 and a time disabled

when using the DateTimePicker component.
Dec.20,2021

selectableRange in bug, pick-options in datetime component is invalid. For more information, please see issue

.

try taking it apart. Refer to https://codesandbox.io/s/30kn.

.
Menu