Skip to content

[DMP 2026]: Enhance Bikram Sambat support in CHT #10707

@sugat009

Description

@sugat009

Ticket Contents

The CHT has basic Bikram Sambat (BS) calendar support used in app forms, but several quality-of-life issues make it incomplete for users in Nepal and other regions using this calendar system. The current date picker is minimal (no calendar view, no month navigation), the Reports tab filter still shows the Gregorian calendar even when the language is set to Nepali, there is a bug where dates convert incorrectly when no month is selected, and targets/UHC counts reset on Gregorian month boundaries instead of Bikram Sambat month boundaries.

This project is a collection of improvements to make Bikram Sambat a first-class calendar experience in the CHT. The work can be done incrementally (one issue at a time).

Goals & Mid-Point Milestone

  • Understand the existing Bikram Sambat date picker implementation and the bikram-sambat library
  • Fix the bug where the date picker defaults to Baisakh (first month) when user hasn't selected a month, allowing incorrect date conversion
  • Upgrade the Bikram Sambat date picker with proper calendar view (month/weeks), month/year navigation, "today" button, and clear option
  • Integrate Bikram Sambat calendar into the Reports tab date filter (currently shows Gregorian even in Nepali mode)
  • Add configuration to align target/UHC count resets to Bikram Sambat month boundaries instead of Gregorian months
  • Write unit tests and e2e tests for all changes
  • Goals achieved by mid-point milestone: Date picker bug is fixed, date picker is fully upgraded, and Reports tab date filter uses BS calendar, with unit tests

Expected Outcome

  • A fully functional Bikram Sambat date picker with a proper calendar view, navigation controls, and parity with the Gregorian date picker UX
  • The Reports tab date filter displays the Bikram Sambat calendar when the platform language is set to Nepali
  • The date picker no longer silently defaults to Baisakh when no month is selected
  • A new configuration option (e.g. in app_settings) that allows target/UHC counts to reset at the beginning of BS months instead of Gregorian months

Implementation Details

The Bikram Sambat date picker widget lives in:

  • webapp/src/ts/ (Angular webapp components)

The nepali-date-picker (demo) can be used as reference for the improved date picker UI.

For the date picker bug: the widget currently converts the date even when the user hasn't selected a month, defaulting to Baisakh. The fix should either require month selection before conversion or handle the missing month gracefully.

For the Reports tab filter: the date filter component needs to detect when the platform language is Nepali and render the BS calendar instead of Gregorian. Date range conversions between BS and Gregorian will be needed for the underlying CouchDB queries.

For target/UHC alignment: currently targets are stored with an identifier that includes YYYY-MM for the Gregorian month. The uhc.visit_count.month_start_date setting controls the day targets reset. A new configuration would override this to use BS month boundaries instead.

Key technical consideration: an open design question exists around whether a BS month can ever start and end within the same Gregorian month, which could cause target document ID collisions.

Product Name

Community Health Toolkit: cht-core

Organization Name

Medic

Domain

Healthcare

Tech Skills Needed

Angular, CSS, Docker, JavaScript, Mocha, Node.js, TypeScript

Organizational Mentor

@sugat009, @jkuester

Complexity

High

Category

Frontend, Localization

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions