Skip to content

datetime2 component migration

Adi Dahiya edited this page Jun 13, 2022 · 15 revisions

To prepare for the Popover changes coming in Blueprint v5.0, we're providing "v2" variants of @blueprintjs/datetime and @blueprintjs/timezone components which use Popover2 instead of Popover. Migrate to these now in order to ensure a smooth migration path.

These components are available in the new @blueprintjs/datetime2 package:

Replacement for DateInput.

TODO(adahiya)

Replacement for TimezonePicker, with notable changes:

  • Component name has changed to better match semantic naming patterns of other Blueprint components:
    • It is a specialized select component, not a picker component.
    • Note that we use the term "picker" to refer to DatePicker / DateRangePicker, which do not rely on popovers.
  • Component uses Select2 instead of Select, so there are some DOM changes — see Select2 migration for more info.
  • New prop fill matches behavior of <Select fill>.
  • New prop valueDisplayFormat controls how the selected timezone label will be rendered in the default button target (if children is left undefined).
  • The type of popoverProps has changed to Popover2Props, which means a few properties have changed. See Popover2 migration for more info.
    • popover positioning may be specified with "placement" or "position"
    • boundary has been replaced with rootBoundary, which better matches popper.js' definition of what a "boundary" is
    • modifiers type has changed
    • targetClassName and targetTagName properties have been removed
Clone this wiki locally