← All recipes
Moderne licensed

Rename Calendar to DatePicker

Recipe IDorg.openrewrite.primeng.RenameCalendarToDatePickerArtifact@openrewrite/recipes-angular

Renames Calendar and CalendarModule imports from primeng/calendar to DatePicker and DatePickerModule from primeng/datepicker, and updates all identifier usages. The old names are deprecated in PrimeNG 18.

Composite recipeProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.primeng.RenameCalendarToDatePicker

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-angular

Definition

This recipe runs the following recipes in order.

  • Rename Calendar identifiers to DatePickerorg.openrewrite.primeng.RenameCalendarToDatePicker.identifiers
  • Change importorg.openrewrite.javascript.change-import
  • Change importorg.openrewrite.javascript.change-import