COMPONENTES / PLAYGROUND

Extended DateTimePicker

Configura, prueba y copia el código para tu proyecto.

Explora un modo
01

Hazlo tuyo

Ajusta el comportamiento y el estilo.

Fechas y límites
Usa YYYY-MM-DD. Para un rango o varias fechas, sepáralas con comas. Deja vacío para no preseleccionar ninguna fecha.
Controles y acciones
02

Pruébalo en vivo

La misma configuración, dos formas de usarla.

Configuración aplicada

Haz clic para abrir. El resultado aparece en este campo.

Vista integrada

inline

Código de tu configuración


Documentación y referencia de la API
Soporte de Elementos Destino

El plugin detecta automáticamente la etiqueta del selector sobre el cual es invocado:

  • Si es un <input>: Se comporta como un desplegable emergente (dropdown) posicionado dinámicamente bajo el campo de texto.
  • Si es un <div> o contenedor genérico: Se renderiza directamente en el DOM en modo estático (inline), mostrándose completo y visible de inmediato.
Atributos y Opciones de Configuración
OptionTypeDefaultDescription / Allowed Values
modestring'single''single', 'range', 'multiple', or 'birthday'.
layoutstring'vertical''vertical' or 'horizontal'. Horizontal applies when both calendar and clock are visible outside birthday mode.
showCalendarbooleantrueShow the calendar; birthday mode uses its own date controls.
showClockbooleantrueShow the clock. Set to false for date-only selection.
themeColorstring'success'Bootstrap color name, such as 'primary', 'success', or 'danger'.
format24hbooleantrueUse 24-hour display; false shows 12-hour time with AM/PM.
defaultTimestring/array/nullnullInitial HH:mm time, or two times for a range. Configuration always uses 24-hour format.
selectedDatesarray[]Initial ISO dates. Single/birthday use one; range uses up to two; multiple accepts several.
minDatestring/nullnullEarliest selectable ISO date, inclusive.
maxDatestring/nullnullLatest selectable ISO date, inclusive.
disableWeekendsbooleanfalseDisable Saturdays and Sundays.
disabledDatesarray[]Specific ISO dates that cannot be selected.
doubleMonthbooleanfalseDisplay two consecutive calendar months.
dateFormatstring'YYYY-MM-DD'Output format, for example 'DD/MM/YYYY'.
langstring/object'es''es', 'en', or a partial/custom translation object.
actionsarray['close', 'today', 'now', 'clear']Footer buttons in the supplied order; [] hides them. Today requires the calendar; Now requires the clock; Close closes input dropdowns.
Métodos Públicos

Puedes invocar métodos pasando el nombre de la acción como cadena de texto al plugin:

open

Abre manualmente el cuadro desplegable en elementos <input>.

$('#picker-input').extendedDateTimePicker('open');
close

Cierra el cuadro desplegable activo.

$('#picker-input').extendedDateTimePicker('close');
destroy

Destruye la instancia, elimina event listeners y restaura el DOM original.

$('#picker-input').extendedDateTimePicker('destroy');
Callbacks / Eventos
CallbackDefaultParameters and behavior
onOpenNo-op functionNo arguments. Runs when a picker opens; this is the target element.
onCloseNo-op functionNo arguments. Runs when a picker closes, including when another input picker opens; this is the target element.
onSelectDatenull(dateObj, formattedDates): a Date for single/birthday, an array of dates for range/multiple, and an array of formatted strings. Clear or a blocked birthday edit returns (null, []). Today also invokes this callback.
onSelectTimenull(timeState): { hour, minute }, plus ampm in 12-hour mode. Range mode returns an array of start/end time objects.