diff --git a/website/public/llms-full.txt b/website/public/llms-full.txt index 5cf7f37..10300c5 100644 --- a/website/public/llms-full.txt +++ b/website/public/llms-full.txt @@ -5,7 +5,7 @@ - Docs: https://qwik-date.dieco.dev - Source: https://github.com/diecodev/qwik-date - npm: https://www.npmjs.com/package/qwik-date -- This file: generated from the docs on 2026-10-28. The dates in the examples count from that day. +- This file: generated from the docs on 2026-10-29. The dates in the examples count from that day. ## Versions @@ -14,7 +14,7 @@ | 2.x (beta) | v2, `@qwik.dev/core` 2.0.0-rc.4 or later (peer dependency) | `qwik-date@beta` | | 1.x | v1, `@builder.io/qwik` | `qwik-date@1` | -2.x is ESM only, needs Node 20.19+ or 22.12+, and has no runtime dependencies. Until 2.0 is stable, installing `qwik-date` without a tag gives 1.0.0, which is for Qwik v1: keep `@beta`. +2.x is ESM only, needs Node 22.12+, and has no runtime dependencies. Until 2.0 is stable, installing `qwik-date` without a tag gives 1.0.0, which is for Qwik v1: keep `@beta`. ```sh npm install -D -E qwik-date@beta @@ -130,7 +130,7 @@ While a range has a start and no end, the days up to the pointer or the focus ge ### Booking a stay across two months ```tsx -const stay = useSignal({ start: '2026-10-28', end: '2026-11-04' }); +const stay = useSignal({ start: '2026-10-29', end: '2026-11-05' }); ``` @@ -154,7 +154,7 @@ A click, Enter or Space marks a day, and unmarks it if it was marked. There's no const now = new Date(); const today = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}` as LocalDate; - + ``` `min` and `max` are the first and the last day that can be chosen. The month buttons stop at their months, and the months and years views disable the ones past them. @@ -181,7 +181,7 @@ import { Form, routeAction$ } from '@qwik.dev/router'; import { Calendar, type LocalDate } from 'qwik-date'; export const useBook = routeAction$((data) => { - // { days: ['2026-10-28', '2026-11-04'] } + // { days: ['2026-10-29', '2026-11-05'] } return { days: data.days }; }); @@ -233,10 +233,10 @@ const fr: Labels = { ```tsx import { formatDate, formatDateRange } from 'qwik-date'; -formatDate('2026-10-28'); // 'Oct 28, 2026' -formatDate('2026-10-28', 'es'); // '28 Oct 2026' -formatDateRange({ start: '2026-10-28', end: '2026-11-04' }); // 'Oct 28, 2026 – Nov 04, 2026' -formatDateRange({ start: '2026-10-28', end: null }); // 'Oct 28, 2026 – …' +formatDate('2026-10-29'); // 'Oct 29, 2026' +formatDate('2026-10-29', 'es'); // '29 Oct 2026' +formatDateRange({ start: '2026-10-29', end: '2026-11-05' }); // 'Oct 29, 2026 – Nov 05, 2026' +formatDateRange({ start: '2026-10-29', end: null }); // 'Oct 29, 2026 – …' ``` ### Dark mode @@ -342,7 +342,7 @@ const PriceDays = component$<{ prices: Record }>(({ prices }) => - + ; ``` @@ -417,10 +417,10 @@ Use `qwik-date@1`: `CalendarInline` from `qwik-date/inline` (`date`, `onDateChan | Prop | Type | Default | Description | Example | | --- | --- | --- | --- | --- | | `mode` | `'single' \| 'range' \| 'multiple'` | `'single'` | What a click selects: one day, a start and an end, or any days. It sets the type of `value`, `bind:value` and `onChange$`. | `` | -| `value` | `LocalDate \| DateRange \| LocalDate[] \| null` | `null` | The selected value, selected from the start: a day, a `DateRange` with `mode="range"`, or the days with `mode="multiple"` (`[]` by default). The calendar opens on its month, or on today's without one. (1.x: `date`) | `` | +| `value` | `LocalDate \| DateRange \| LocalDate[] \| null` | `null` | The selected value, selected from the start: a day, a `DateRange` with `mode="range"`, or the days with `mode="multiple"` (`[]` by default). The calendar opens on its month, or on today's without one. (1.x: `date`) | `` | | `bind:value` | `Signal<…>` | | A signal of the value's type, kept in sync in both directions: write to it and the calendar shows that month. (1.x: `bind:date`) | `const date = useSignal(null); ` | | `onChange$` | `(value) => void` | | Called with the new value on every choice. In a range, also after the first day, with `end: null`; with `mode="multiple"`, on every mark and unmark, with the days in order. (1.x: `onDateChange$`) | ` console.log(value)} />` | -| `min, max` | `LocalDate` | | The first and the last day that can be chosen. The month buttons stop at their months, and the months and years views disable the ones past them. | `` | +| `min, max` | `LocalDate` | | The first and the last day that can be chosen. The month buttons stop at their months, and the months and years views disable the ones past them. | `` | | `disabledDates` | `readonly LocalDate[]` | | Days that can't be chosen. The keyboard skips them, and a range can't cross them: it ends right before the first one, as with every day ruled out. | `` | | `disabledWeekdays` | `readonly WeekDay[]` | | Weekdays that can't be chosen, `0` for Sunday: `[0, 6]` disables the weekends. | `` | | `months` | `number` | `1` | How many months show side by side, with one Tab stop for all of them. The buttons move one month, and they stack on narrow screens. | `` | diff --git a/website/public/llms.txt b/website/public/llms.txt index b78724c..8883c81 100644 --- a/website/public/llms.txt +++ b/website/public/llms.txt @@ -8,7 +8,7 @@ Key facts for writing code with it: - Import from `qwik-date` (styled `Calendar`, `formatDate`, `formatDateRange`, types) or `qwik-date/headless` (`Calendar.Root` and the other parts, `useCalendar`). There is no `DatePicker` component in 2.x: put the `Calendar` in a popover (see the date picker recipe). - Dates are `'YYYY-MM-DD'` strings (`LocalDate`), without time or timezone. `mode="range"` takes `{ start, end }` (`DateRange`, `end` is `null` until chosen); `mode="multiple"` takes `LocalDate[]`. - Bind state with `bind:value={signal}`, or `value` and `onChange$`. -- ESM only. Requires Node 20.19+ or 22.12+. +- ESM only. Requires Node 22.12+. ## Docs diff --git a/website/scripts/llms-full.md b/website/scripts/llms-full.md index 613c925..0a19870 100644 --- a/website/scripts/llms-full.md +++ b/website/scripts/llms-full.md @@ -14,7 +14,7 @@ | 2.x (beta) | v2, `@qwik.dev/core` 2.0.0-rc.4 or later (peer dependency) | `qwik-date@beta` | | 1.x | v1, `@builder.io/qwik` | `qwik-date@1` | -2.x is ESM only, needs Node 20.19+ or 22.12+, and has no runtime dependencies. Until 2.0 is stable, installing `qwik-date` without a tag gives 1.0.0, which is for Qwik v1: keep `@beta`. +2.x is ESM only, needs Node 22.12+, and has no runtime dependencies. Until 2.0 is stable, installing `qwik-date` without a tag gives 1.0.0, which is for Qwik v1: keep `@beta`. ```sh npm install -D -E qwik-date@beta diff --git a/website/src/routes/changelog/index.tsx b/website/src/routes/changelog/index.tsx index c5261fc..9142893 100644 --- a/website/src/routes/changelog/index.tsx +++ b/website/src/routes/changelog/index.tsx @@ -6,6 +6,7 @@ import { pageAt } from '~/data/site' const BREAKING = [ 'Needs Qwik v2 (`@qwik.dev/core`). The CommonJS build is gone.', + 'Needs Node 22.12 or later: Node 20 is no longer supported.', 'Everything is exported from `qwik-date`. `qwik-date/inline` and `qwik-date/picker` are gone.', '`DatePicker` is removed. Put the `Calendar` in a popover instead.', '`date`, `bind:date` and `onDateChange$` are now `value`, `bind:value` and `onChange$`. The value is selected from the start.', @@ -14,6 +15,8 @@ const BREAKING = [ '`CalendarProps` is a type alias: extend it with an intersection, not an interface.', '`labels` has new texts, required for locales other than `en` and `es`.', 'An `aria-label` in `containerProps` is now followed by the selection, and `containerProps` no longer takes `onChange$`.', + 'The title is a button that opens the months and the years: Tab stops on it in browsers that tab to buttons.', + "The selected day's button has `data-selected`: `aria-selected` moved to its cell, the `gridcell`.", ] const FEATURES = [ @@ -75,6 +78,7 @@ const RENAMES: [string, string][] = [ 'your own trigger + formatDate()', ], ['[data-preselected]', '[aria-current="date"]'], + ['button[aria-selected="true"]', 'button[data-selected]'], [ 'interface Props extends CalendarProps', 'type Props = CalendarProps & Extra', @@ -112,7 +116,7 @@ export default component$(() => ( 2.0.0-beta.0

- tag: beta · qwik v2 + tag: beta · qwik v2 · 2026-10-29

qwik-date 2 is built for Qwik v2 and only does the calendar now: the @@ -151,7 +155,8 @@ export default component$(() => (

  1. Move your app to Qwik v2. qwik-date 2 needs{' '} - @qwik.dev/core and ships ESM only. + @qwik.dev/core and Node 22.12 or later, and + ships ESM only.
  2. Install qwik-date@beta. diff --git a/website/src/routes/index.tsx b/website/src/routes/index.tsx index 13eed03..31589b6 100644 --- a/website/src/routes/index.tsx +++ b/website/src/routes/index.tsx @@ -102,8 +102,7 @@ export default component$(() => {

    - 2.x is ESM only, needs Node 20.19+ or 22.12+, and has zero runtime - dependencies. + 2.x is ESM only, needs Node 22.12+, and has zero runtime dependencies.

    next