Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Taarikh

Security covered Maintenance fixes only 25 sites

Taarikh provides a field formatter and widget for Drupal's date module, allowing users to input and display dates in the Hijri calendar. It also offers developer tools for custom form elements and supports defining custom calendar types.

Taarikh is a field formatter and widget module to display and input Hijri dates for the fields defined by Drupal core's datetime
module.

This module also provides element types that you, as a developer, can use in your own forms.

When do I need this module?

You need this module for any of the following use cases:

  • You need to allow users to enter dates in Hijri or another calendar.
  • You need to display dates in Hijri or another calendar.
  • You need to define your own calendar types.

Requirements

  • Taarikh 2.x: Drupal ^11.2 || ^12
  • Taarikh 1.x: Drupal ^10.3 || ^11 (if your site is running Drupal 10, stay on the 1.x branch)

Installation

Install the module using Composer:

composer require drupal/taarikh:^2.0

Composer will automatically download the required hussainweb/date-converter and hussainweb/taarikh-picker
packages. Because hussainweb/taarikh-picker is published as a drupal-library package on Packagist, it
automatically downloads into your site's libraries/ directory. No custom package repositories or legacy jQuery plugins are
required.

Upgrading from 1.x to 2.x

In Taarikh 1.x, the date picker widget depended on Keith Wood's third-party jQuery Calendars plugin (

kbwood/jquery.
calendars

). Because that library was not published on Packagist, installation required adding a custom package
repository in the project's root composer.json and explicitly requiring the library.

In Taarikh 2.0, the widget uses Taarikh Picker, a modern, accessible,
zero-dependency JavaScript date picker. Because hussainweb/taarikh-picker is published on Packagist with the

drupal-
library

package type, it downloads automatically as a standard dependency without requiring manual repository configuration.

Upgrade Steps

  1. Update Taarikh to 2.x:

    composer require drupal/taarikh:^2.0
  2. Remove the legacy jQuery Calendars dependency:

    composer remove kbwood/jquery.calendars
  3. Clean up your root composer.json:

    Remove the custom repository definition for kbwood/jquery.calendars from the repositories array in
    your root composer.json:

    {
        "type": "package",
        "package": {
            "name": "kbwood/jquery.calendars",
            "type": "drupal-library",
            "version": "2.1.0",
            "dist": {
                "url": "http://keith-wood.name/zip/jquery.calendars.package-2.1.0.zip",
                "type": "zip"
            }
        }
    }
  4. (Optional) Remove Drupal 12 jQuery compatibility shims:

    If you had previously installed drupal/jquery_downgrade solely to support jQuery Calendars on Drupal 12, you can
    remove it:

    composer remove drupal/jquery_downgrade
  5. Rebuild cache:

    drush cache:rebuild

Usage

This module does not provide a new field type, just widgets and formatters. This means that you are free to switch the widgets
and/or formatters for each field separately without losing any data. The data is stored in the database as a regular Gregorian date.

This also means that you typically would want to set both widget and formatters. If you just change the widget for a content type,
the user will be able to enter the date using the Hijri calendar, but it will be displayed using the Gregorian calendar when viewing the
content. To view it using the Hijri calendar, you also need to change the formatter.

Using the formatter

Go to the Manage display tab of any content type or entity type. For all date fields, you can now change the
formatter to Taarikh date and time. You can select the algorithm and the format from the settings.

Using the widget

Go to the Manage form display tab of any content type or entity type. For all date fields, you can now change the
widget to Taarikh date and time.

Local Development

We use DDEV to work on this module. Development setup is automated via the ./setup_dev.sh script, which sets up DDEV
with PHP 8.5, SQLite, and supports specifying the target Drupal version (11 or 12):

./setup_dev.sh 12

This will set up a DDEV site at https://taarikh.ddev.site.

Drupal 11 · not 10

Ask your assistant about Taarikh

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • datetime Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Nov 2023
Latest release
1 month ago
Releases (12 mo)
5 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.0.1 Stable 11 Oct 24, 2026
2.0.0 Stable 11 Oct 23, 2026
2.0.0-beta1 Pre-release 11 Oct 17, 2026
2.0.x-dev Dev 10–11 Oct 14, 2026
8.x-1.3 Stable 10–11 Oct 10, 2026
8.x-1.2 Stable 10–11 Nov 2, 2025
8.x-1.1 Stable 9–10 Nov 16, 2023