Date & time
DateTimeRangePicker
A compact range entry with a calendar popup, minute precision, quick presets, and independently optional bounds.
Example

Usage
Filter by a date range
Open the compact entry, select two dates, or choose a whole-day preset. Query inclusion belongs to the application.
#include <FluentQt/DateTime.h>
using namespace fluent::date_time;
auto* picker = new DateTimeRangePicker(this);
picker->setStartLabelText("Start");
picker->setEndLabelText("End");
picker->setTimeEnabled(false);
picker->setRange(QDateTime(QDate(2025, 10, 1), QTime(0, 0)),
QDateTime(QDate(2025, 11, 1), QTime(0, 0)));import fluentqt
from PySide6.QtCore import QDate, QDateTime, QTime
picker = fluentqt.DateTimeRangePicker()
picker.setStartLabelText("Start")
picker.setEndLabelText("End")
picker.setTimeEnabled(False)
picker.setRange(
QDateTime(QDate(2025, 10, 1), QTime(0, 0)),
QDateTime(QDate(2025, 11, 1), QTime(0, 0))
)API
DeclarationNo matching API members.
fluent::date_time::DateTimeRangePicker
Inherits QWidget · FluentElement · QMLPlus
Compact range entry with a calendar flyout and independently nullable endpoints.
Constructors
Properties
QDateTime startDateTime- Read
startDateTime()WritesetStartDateTime()ResetclearStart()NotifystartDateTimeChanged() QDateTime endDateTime- Read
endDateTime()WritesetEndDateTime()ResetclearEnd()NotifyendDateTimeChanged() bool timeEnabled- Read
isTimeEnabled()WritesetTimeEnabled()NotifytimeEnabledChanged() bool rangeValid- Read
isRangeValid()NotifyrangeValidityChanged() QString startLabelText- Read
startLabelText()WritesetStartLabelText()NotifystartLabelTextChanged() QString endLabelText- Read
endLabelText()WritesetEndLabelText()NotifyendLabelTextChanged() QString invalidRangeText- Read
invalidRangeText()WritesetInvalidRangeText()NotifyinvalidRangeTextChanged() QLocale locale- Read
locale()WritesetLocale()NotifylocaleChanged() QString placeholderText- Read
placeholderText()WritesetPlaceholderText()NotifyplaceholderTextChanged() bool pickerOpen- Read
isPickerOpen()WritesetPickerOpen()NotifypickerOpenChanged() bool presetsVisible- Read
isPresetsVisible()WritesetPresetsVisible()NotifypresetsVisibleChanged() bool autoApplyPresetsEnabled- Read
isAutoApplyPresetsEnabled()WritesetAutoApplyPresetsEnabled()NotifyautoApplyPresetsEnabledChanged()
Methods
CalendarView* calendarView() constReturns the picker-owned range calendar for navigation and week settings.
CalendarDatePicker* startDatePicker() constReturns picker-owned inputs for formatting and accessibility setup.
void setRange(const QDateTime& start, const QDateTime& end)Updates both endpoints before emitting their change signals.
void setTimeEnabled(bool enabled)Shows time inputs or normalizes both endpoints to midnight.
void openPicker()Opens the same-window range calendar, endpoint editors, and presets.
void applyPreset(Preset preset)Applies a built-in preset relative to local today or a supplied reference.
Signals
void presetRequested(Preset preset)Requests a shortcut; disable auto application to supply business ranges.
Enumerations
enum class PresetBuilt-in rolling calendar ranges including the reference day.
TodayYesterdayPastWeekPastMonthPastSixMonthsPastYear
Destructors
Subclass interfaces
Methods
Inherited from fluent::FluentElement
Methods
static void setTheme(Theme theme)Updates the global theme and notifies active FluentElement instances.
static void setThemeDeferred(Theme theme)Schedules a visible-first batched theme refresh without blocking the current interaction.
static Theme currentTheme()Returns the currently active global theme.
static bool themeUsesDarkAppearance(Theme theme)Returns whether a theme uses dark-backed chrome and material tokens.
static void refreshTheme()Re-broadcasts the current theme to repaint after a design-token change.
static int themeGeneration()Monotonic counter bumped on every theme change, for staleness checks.
Theme effectiveTheme() constResolves the theme used by this element, honoring an inherited QWidget override.
bool effectiveThemeUsesDarkAppearance() constReturns whether this element's effective theme uses dark-backed chrome.
bool setThemeOverrides(const QJsonObject& overrides)Component-facing token accessors.
QJsonObject themeOverrides() constReturns this element's authored overrides.
void clearThemeOverrides()Restores all token fields to global theme defaults.
const Colors& themeColorsRef() constNon-copying access to the active color set (for hot paint paths).
Material::AcrylicToken themeAcrylic() constMaterial, elevation, and adaptive layout tokens.
QColor themeBackdrop(bool active) constWindow-chrome backdrop color for the given activation state.
virtual void onThemeUpdated()Called after the global theme changes.
Enumerations
enum ThemeGlobal visual theme used when resolving design tokens.
Light = 0Dark = 1HighContrast = 2
Types and aliases
struct ColorsDesign token snapshots returned to components.
Inherited from fluent::QMLPlus
Methods
AnchorLayout::Anchors* anchors()Returns mutable anchors for the QWidget host.
void setState(const QString& name)Applies a named state, or clears state when name is empty.
void addState(const QMLState& state)Registers or replaces a named state definition.
void evaluateStates()Reevaluates conditions; the first registered true condition wins.
QMLPlusRuntime* runtime()Returns the lazy host-owned state observation object.
void setAnchors(const AnchorLayout::Anchors& anchors)Replaces all host anchors and invalidates the parent layout.
void resetAnchors()Clears all host anchors and invalidates the parent layout.
void bind(const char* targetProp, QObject* source, const char* sourceProp, PropertyBinder::Direction dir = PropertyBinder::OneWay)Binds a source property to a property on the QWidget host.
BindingHandle bindManaged(const char* targetProp, QObject* source, const char* sourceProp, PropertyBinder::Direction direction = PropertyBinder::OneWay, BindingOptions options = {})Installs a managed direct binding on this QWidget host.
BindingHandle bindComputed(const char* targetProp, const QVector<BindingDependency>& dependencies, std::function<QVariant()> evaluate, BindingOptions options = {})Installs an explicit-dependency C++ expression on this QWidget host.
void addTransition(const StateTransition& transition)Registers a state transition in precedence order.
void setBehavior(const char* propertyName, const PropertyAnimation& animation)Sets the default animation for this host's managed property writes.
void clearBehavior(const char* propertyName)Removes the default animation for future managed writes.
bool writeProperty(const char* propertyName, const QVariant& value)Writes a host property through Behavior without removing its binding.
All inherited Qt members:QWidget