Skip to content

Releases: MohammadSadeghMehrafzoon/ComposeDatePicker

Add min/max year support

Choose a tag to compare

@MohammadSadeghMehrafzoon MohammadSadeghMehrafzoon released this 02 Feb 09:33

Optional year range constraints for the DatePicker

Use [MinYear.On] and [MaxYear.On] to explicitly limit the selectable year range.
If not provided, the DatePicker will fall back to its internal default configuration.

Example:

  • minYear = MinYear.On(1400),
  • maxYear = MaxYear.On(1407),

Add default date

Choose a tag to compare

@MohammadSadeghMehrafzoon MohammadSadeghMehrafzoon released this 12 Jul 13:32

You can provide a default date using separate year, month, and day values at the time of initialization. This allows the date picker to open with a pre-selected date, which is especially useful when editing previously saved user data.

If no default date is provided, the current system date will be used by default.

You can initialize the date picker with a pre-selected date by setting:

useInitialDate = true,
initialDate = Triple(1404, 6, 27)

useInitialDate: A boolean flag indicating whether to use a predefined date.
initialDate: A Triple<Int, Int, Int> representing the year, month, and day in the Persian calendar.

V1.1.2

Choose a tag to compare

@MohammadSadeghMehrafzoon MohammadSadeghMehrafzoon released this 30 Jun 06:20

This feature enables selecting only the month and year without requiring a specific day. It is designed for use cases where choosing an exact day is unnecessary, such as selecting a salary period, setting a contract start date, or recording monthly data.

By setting datePickerWithoutDay = true, the date picker switches to month and year selection mode, hiding the day selection. This is useful when you only need to capture a general date without specifying the exact day — for example, in salary reports, monthly summaries, or contract periods.

V1.1.1

Choose a tag to compare

@MohammadSadeghMehrafzoon MohammadSadeghMehrafzoon released this 28 Jun 08:24

Fix ui

V1.1.0

Choose a tag to compare

@MohammadSadeghMehrafzoon MohammadSadeghMehrafzoon released this 11 Jun 05:45

New Date Formatting Methods

I've added three new methods to the library for enhanced date formatting:

  1. getFullDate(): String: This method returns the full Persian date in the format "YYYY/MM/DD". For example, if today is June 11, 2025, it might return "1404/03/22" (assuming the current Persian date).

  2. getPersianMonthNameAndPersianYear(): String: Use this method to get the Persian month name and year. For instance, it would return something like "خرداد 1404"

  3. getMiladiFullDate(): String: This method provides the full Gregorian (Miladi) date in the "YYYY/MM/DD" format. For example, it would return "2025/06/11" for today's date.

These additions give you more flexibility in displaying and working with both Persian and Gregorian dates within your applications.

Version 1.0.0

Choose a tag to compare

@MohammadSadeghMehrafzoon MohammadSadeghMehrafzoon released this 10 Jun 12:34
V1.0.0

initial commit