Implement a Date widget with spinner input (no-calendar appearance)

Aperta
#781 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
typescript

Direzione di ricerca

Inizia con l’architettura esistente del componente DateInput e confronta il comportamento previsto con ODK Date Widget Reference. Definisci test per l’aspetto senza calendario, incluse le domande Date e DateTime, i nomi dei mesi localizzati e i limiti dei giorni tra mesi e anni bisestili. Il lavoro è completato quando tre colonne scorrevoli funzionano e si aggiornano in modo coerente senza la griglia del calendario.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

front-end In Collect In Enketo
Description

Implement a Date widget with spinner input within the form renderer. This widget allows users to select a date by scrolling through separate vertical columns for Day, Month, and Year instead of using a standard grid-based calendar picker. This is triggered by the appearance="no-calendar" attribute in the XForm definition.

Key requirements include:

  • Three independent scrolling columns (spinners).
  • Dynamic adjustment of the "Day" column based on the selected Month and Year (e.g., February 29th logic for leap years).
  • Support for localization of month names.
  • Date and DateTime question types support "no-calendar"

Checklist
  • Does it need UI/UX design?
    • Yes
    • No
  • Does it need API design?
    • Yes
    • No
  • Does it need design around state flow?
    • Yes
    • No
  • Does it need a test plan?
    • Yes
    • No

User Stories
  • As a data collector entering a date far in the past,
    I want to use scrolling "flywheel" pickers rather than a calendar grid,
    so that I can navigate through decades much faster than clicking through individual months.

  • As a non-technical user,
    I want an intuitive scrolling interface for year selection,
    so that I don’t get stuck manually clicking through months because I didn't realize the year label in a calendar UI was a clickable shortcut.

  • As a data collector reading from a physical document,
    I want to input date components linearly using spinners,
    so that the digital entry process feels more analogous and direct compared to the printed information I am looking at.


Design

Dependencies
  • Existing DateInput component architecture.
  • Internationalization (i18n) library for localized month names.

Related Issues
Lingua principale
TypeScript
Stelle
38
Fork
24
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getodk/web-forms

Tutte le issue di getodk/web-forms

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.