Skip to main content
iVentureTeam

datetime

The datetime widget renders every Date & Time field in Odoo. It is one of the rare widgets Studio exposes almost completely, and it hides an undocumented range-pairing ability.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 18, 2026Updated August 18, 20268 min read
Studio nameDate & Time
Technical namedatetime
Field typesdatetime
Viewsform, list, kanban, calendar (default widget for datetime fields)
Also registered aslist.datetime, an autoresizing list variant; the same file also registers date and daterange
Moduleweb, present in every Odoo database
Used in core7 explicit occurrences across hr_holidays, l10n_in_ewaybill, mass_mailing, stock, website, mrp; implicitly it renders every datetime field
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupYes, and unusually completely: Studio exposes most options as field properties
Alternativesdate, daterange, remaining_days, float_time

What the Date & Time field does

Delivery dates, meeting starts, deadlines with a time component: every fields.Datetime renders through this widget by default. It shows a formatted value in the user's timezone and language, and opens a combined calendar and time picker on focus. The time selector proposes minutes in configurable steps, five by default.

The widget shares one source file and one component with date and daterange. That matters practically: the three registrations differ mainly in their declared options and supported types, and some abilities documented only for one of them actually work on the others. The range pairing covered below is the prime example.

In list views it also brings sizing intelligence: column width adapts depending on whether the field shows time and whether the numeric format is on, and a separate list.datetime registration autoresizes the input.

What this means for your team

Datetime fields are where timezone and precision decisions quietly shape operations. A warehouse that schedules in 15-minute waves wants the picker stepping in quarters, not fives. An HR team reviewing requests does not need seconds on approval timestamps, and a logistics coordinator entering e-waybill deadlines benefits from a warning icon when the date lands in the future by mistake.

All of that is configuration on this one widget, and, unusually for Odoo, nearly all of it is exposed in Studio's property panel. That makes datetime tuning one of the few polish passes a functional consultant can do end to end without a developer: set sensible time intervals, hide time where it is noise in list views, add accepted-date limits where users routinely mistype years. Teams notice this kind of polish immediately because they touch these fields dozens of times a day.

The one decision to make deliberately at rollout is seconds. If your processes compare timestamps to the second, switch show_seconds on where it matters and remember that Odoo 19 hides them by default where Odoo 18 showed them.

Setting it up in Odoo Studio (no code)

Odoo Studio (Enterprise) exposes this widget more completely than almost any other.

  1. Open the form or list in Studio.

  2. From the Add tab, drag a Date & Time field onto the view. The datetime widget is the default rendering.

  3. Open Properties. Beyond the general properties, Date & Time fields get a dedicated set: Minimal precision and Maximal precision for the picker's navigation depth, Warning for future dates, Date format for the numeric style, Show time and Show seconds, Time interval for the minute steps, and Earliest accepted date and Latest accepted date, which accept an ISO date or the word today.

  4. Click Close when done. Every one of these maps directly to a widget option in the table below.

What Studio cannot do here

Two things stay out of Studio's reach. Pairing two fields into a single range input on the plain datetime widget, via start_date_field and end_date_field, is XML-only; Studio offers the separate Date Range widget for the standard version of that pattern. And the accepted-date limits are static: an ISO date or today. A limit that depends on another field on the record, such as "no earlier than the order date", needs a developer, either through an onchange, a constraint, or a custom widget.

Supported options in Odoo 19

Verified against datetime_field.js in the Odoo 19.0 web module. The last three entries are absent from the widget's declared option list and were read from extractProps and fieldDependencies, which process them for the plain datetime widget even though only daterange declares them.

OptionTypeWhat it does
roundingnumberMinute steps proposed by the time selector, e.g. 15 for quarter hours. Forced to 0 when show_seconds is enabled so seconds become selectable.(default: 5)
show_timebooleanSet false to display only the date part of the stored datetime. List views also narrow the column width accordingly.(default: true)
show_secondsbooleanShows seconds in the readable format and the picker. The component default was true in 18.0 and flipped to false in 19.0.(default: false)
min_datestringEarliest selectable date, as an ISO date or the literal word today. Earlier dates gray out in the picker.
max_datestringLatest selectable date, same format as min_date.
warn_futurebooleanDisplays a warning icon when the selected date lies in the future.
min_precisionselectionSmallest unit the picker requires: days, months, years or decades. Month precision turns the field into a month picker.
max_precisionselectionLargest unit the picker can zoom out to: days, months, years or decades.
numericbooleanSwitches display from the readable style (Jan 31) to the locale's numeric style (01/31) and adjusts list column widths.(default: false)(since Odoo 19.0)
placeholder_fieldfield nameA field on the record supplying a dynamic placeholder; date-typed values are formatted with the widget's own format options.(since Odoo 19.0)
start_date_fieldfield nameUndocumented on this widget: pairs another field as the range start, rendering both as one range input exactly like daterange. The paired field is auto-loaded and forced editable.
end_date_fieldfield nameUndocumented on this widget: pairs another field as the range end. Declaring both pairing options warns in the console and start_date_field wins.
always_rangebooleanUndocumented on this widget: keeps the full range input visible even when one side is empty. Read by extractProps for all three registrations in the file.(default: false)

Seconds interact with the time interval. When show_seconds is enabled the picker's rounding is forced to 0 so seconds become selectable; otherwise rounding applies with its default of 5 minutes. And one inheritance quirk: setting a datetime field's placeholder through placeholder_field formats date values with the widget's own format options, so a date-typed placeholder renders like a value, not like raw text.

Working examples

Quarter-hour scheduling

<field name="appointment_start"
       options="{'rounding': 15}"/>

The time selector proposes :00, :15, :30, :45. Users can still type any time; rounding shapes the proposals, it does not constrain input.

Date-only display of a datetime in lists

<field name="deadline"
       options="{'show_time': False}"/>

Keeps storage as datetime while decluttering the column; the list width logic also narrows the column accordingly.

Guard rails on input

<field name="expected_date"
       options="{'min_date': 'today', 'warn_future': True}"/>

Past dates gray out in the picker, and a warning icon appears when the chosen date is in the future, useful when future dates are legal but unusual.

The undocumented range pairing

<field name="stop_datetime"
       options="{'start_date_field': 'start_datetime'}"/>

The plain datetime widget renders both fields as one range input, exactly like daterange, because extractProps reads the pairing options regardless of which of the three registrations is active. The paired field is auto-loaded and forced editable through fieldDependencies; declaring both start_date_field and end_date_field on one field logs a console warning and the start field wins.

Formatting rules that surprise people

Three formatting behaviors in the source explain most "why does it display like that" questions.

Same-day end dates drop their date part. When a range's two values fall on the same day, the second value renders time-only. That is the showDate computation in getFormattedValue, and it is intentional compression, not data loss.

The numeric option switches format families. Default formatting is the readable style (Jan 31), numeric switches to the locale's numeric style (01/31), and the option also drives which width preset list views allocate to the column. Both the option and the Studio property behind it are new in 19.0.

Seconds are display-layer. show_seconds affects the readable format and the picker granularity; the stored value always carries full precision. Odoo 18 defaulted the component to showing seconds, 19 defaults to hiding them, which is why migrated screens suddenly look cleaner, or, for audit-minded teams, suddenly hide information they relied on.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Option set unchanged in the development branch; internals rewritten. See below.
Odoo 19.0VerifiedAdds numeric and placeholder_field, removes condensed, flips the seconds default to hidden. Verified against the shipped source.
Odoo 18.0VerifiedSame core options plus the now-removed condensed; seconds shown by default.
Odoo 17.0VerifiedWidget present under the same registration; option set close to 18.0.
Odoo 16.0VerifiedWidget present; registered directly as a component class in the pre-descriptor style.

Upgrade note for 18 to 19. Three differences: seconds display flipped from default-on to default-off, the condensed option was removed, and numeric plus placeholder_field were added. Views setting removed or new options migrate silently; the seconds flip is the one users actually notice.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The notes below read the public development branch, which remains unstable until release; we re-verify this page against the shipped version.

The datetime widget's option set is unchanged on the development branch: same ten declared options, same undocumented range pairing, same registrations including list.datetime. The component itself is rewritten onto the new Owl props and signals system, and some option value coercion is simplified in the process (19.0 ran boolean options through an expression parser; master reads them more directly). If you patched DateTimeField or its picker hook, plan a review; if you only configure it from XML, expect no changes.

Common problems and fixes

SymptomCause and fix
Seconds disappeared after upgrading to Odoo 19The component's default flipped from showing to hiding seconds in 19.0. Add options="{'show_seconds': True}" on the views that need them.
The time dropdown only offers 5-minute stepsThat is the default rounding. Set options="{'rounding': 1}" for every minute, or a larger value for coarser steps. Typing an exact time always works.
Users pick dates in the wrong yearNo guard rails on the picker. Set min_date and max_date, in Studio via Earliest and Latest accepted date, using an ISO date or today.
The value shows a different time than was enteredDatetimes are stored in UTC and rendered in each user's timezone; a wrong user timezone shifts every display. Check the user's timezone in their preferences; the stored data is almost certainly correct.
A range shows only a time on the right sideBoth values fall on the same day, so the widget compresses the second one to time-only by design. No fix needed; the full date reappears when the values span days.
Console warns about start_date_field and end_date_fieldBoth pairing options are set on the same field, which the source explicitly warns against. Keep exactly one; the widget ignores end_date_field when both are present.

Date & Time field vs the alternatives

WidgetBest forKey difference
datetimeA single moment in time with date and clockTimezone-aware picker with configurable precision, steps and limits
dateCalendar days without a time componentSame component, date type only, no time selector
daterangePeriods with a start and endDeclares the pairing options officially and adds cross-field validation
remaining_daysDeadlines read as urgencyRenders In 5 days instead of the date itself
float_timeDurations rather than momentsFormats float hours as HH:MM, no calendar involved

The practical test: store what the business event needs. A day without a clock time is a date field; a period is a range; a duration is a float. The datetime widget is for a single moment in time.

Frequently asked questions

How do I change the minute steps in Odoo's time picker?+
Set the rounding option, or the Time interval property in Studio. The default is 5 minutes; 15 gives quarter hours. Enabling seconds forces the step to 0 so seconds become selectable. Users can always type an exact time regardless of the steps.
How do I show only the date of a datetime field?+
Set options="{'show_time': False}", or disable Show time in Studio. The field keeps storing a full datetime; only the display and the list column width change. If the data itself never needs a time, a date field is the better model.
Why did my Odoo forms stop showing seconds after migrating to 19?+
The widget's default flipped in 19.0: Odoo 18 showed seconds unless told otherwise, Odoo 19 hides them unless show_seconds is set. Add the option on views where second-level precision matters.
Can I restrict which dates users can pick?+
Yes: min_date and max_date accept an ISO date or the word today, and gray out everything outside the window. In Studio these are the Earliest and Latest accepted date properties. Limits depending on another field need custom development.
Can the plain datetime widget show a start and end date together?+
Yes, and it is undocumented: set start_date_field or end_date_field in its options and the widget renders both fields as one range input, the same mechanism daterange declares officially. We verified in the source that all three registrations in the file process these options.
Does show_seconds affect what is stored?+
No. Storage always keeps full precision in UTC. The option only changes the readable display and picker granularity, which also means hiding seconds does not round or truncate anything.
What is the numeric option on date and datetime fields?+
New in 19.0, it switches the display from the readable format such as Jan 31, 2026 to the locale's numeric format such as 01/31/2026, and list views allocate a narrower column. In Studio it appears as the Date format property.
Will the datetime widget change in Odoo 20?+
The development branch shows the same options and registrations with rewritten internals on the new Owl framework. Nothing is final until Odoo 20 ships in September 2026, and we re-verify this page against the release.

Scheduling screens that fight your operators?

Pickers stepping in the wrong intervals, timezones shifting deliveries, seconds cluttering approval trails: datetime friction compounds across a workday. We tune Odoo's time handling from view options to timezone policy so entering a date stops being a chore.

Book a free consultation

How this page was produced

The option table was read from datetime_field.js in the Odoo 19.0 web module, including the extractProps and fieldDependencies code paths that reveal the range pairing on the plain widget, and confirmed on a clean Odoo 19 database. The Studio property mapping was cross-checked against the official Studio fields documentation. Version differences come from diffing the file across 16.0 through master. The Odoo 20 section reads the unreleased development branch and is marked as such. Found a discrepancy? Report it and we will fix the page.