goilluminate/elm-fancy-daterangepicker/3.0.0

NOTE: the latest version is 7.0.0

Rerouted (fork, needs approval). The original repository is gone. This copy comes from a fork that still has the tag. The Lamdera package server serves a copy recovered from https://github.com/hulufei/elm-fancy-daterangepicker (a fork).

What we checked: The original repo or its tag is gone; tag 3.0.0 is on the fork https://github.com/hulufei/elm-fancy-daterangepicker; its commit a4651f2bd582 is from 2018-10-28 00:09 UTC, before the version was published (2018-10-28 00:11 UTC); elm.json differs from package.elm-lang.org's; the exposed modules match docs.json; the zip's SHA-1 is not the published one and nothing else confirms its contents.

We could not verify this copy against what was published, so the Lamdera compiler asks before using it (y/n). Without a terminal, as in CI, it stops with an error unless approved:

  • lamdera make --auto-approve-package-rerouting approves rerouted versions for that run,
  • LAMDERA_AUTO_APPROVE_PACKAGE_REROUTING=1 does the same for every run in that environment,
  • LAMDERA_CACHE=off skips the Lamdera package server altogether: packages come from package.elm-lang.org and GitHub only, as with elm, and a rerouted version then fails to download.

Details · package.elm-lang.org's zip: https://github.com/goilluminate/elm-fancy-daterangepicker/zipball/3.0.0/

DateRangePicker.Common

A common library between DatePicker and DateRangePicker

type alias DateRange =
{ start : Date
, end : Date
}

A type representing a date range with a start date and end date.

mkDateRange : Date -> Date -> DateRange

A function that creates a DateRange by taking in two dates (start and end).

This function assumes that start <= end

inRange : Date -> DateRange -> Bool

A function to check if a given date is within a given dateRange.

Settings

= FullCalendar
| ThreeMonths
| TwoMonths
| OneMonth

A type representing how the calendar will be displayed

  • FullCalendar = the datepicker displays all 12 months when open
  • ThreeMonths = the datepicker displays 3 months at a time
  • TwoMonths = the datepicker displays 2 months at a time
  • OneMonth = the datepicker displays 1 month at a time
= Off
| ToPresent
| FromPresent
| Past
| Future
| Between Date Date
| To Date
| From Date

A type representing a restricted range for the datepicker. All dates not within the restricted date range will be disabled.

  • Off = no restrictions, any date to any date can be chosen.
  • ToPresent = from any date in the past up to today (including today)
  • FromPresent = from today to any date in the future
  • Past = from any date in the past up to yesterday (excluding today)
  • Future = from tomorrow up to any date in the future
  • Between date date = only between the two given dates [start - end] (inclusive)
  • To date = from any date in the past up to the given date (inclusive)
  • From date = from the given date up to any date in the future (inclusive)

A function that gets the class string for the CalendarDisplay

A function that gets the display string for the CalendarDisplay