feat: date pick question#796
Conversation
…uestionnaires - Introduced DateQuestion model with minDate, maxDate, dateFormatPreset, and initialDate properties. - Created DateFormatPreset enum for various date formats. - Implemented DateQuestionWidget to handle date selection with optional time. - Added localization support for date-related strings in English and German. - Updated questionnaire form to include date question handling and validation. - Enhanced UI with date picker and time picker functionalities.
|
Visit the preview URL for this PR (updated for commit 911ce56):
(expires Tue, 23 Jun 2026 13:31:47 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 2149dad49ed83535217e50d5c18c0c8c90da629b |
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
…and related logic
…ation - Updated DateQuestionFormData to include input type, min/max time, and default options for date/time. - Modified DateQuestionFormView to dynamically display input fields based on selected input type (date, time, datetime). - Added new localization strings for time input, date input types, and validation messages in both English and German. - Improved UI to handle specific default date/time selections and constraints for min/max dates and times.
|
Failing E2E test also needs to be fixed |
|
I will wait with this until #844 is merged |
6fb8bea to
a67d73d
Compare






This pull request introduces support for a new
DateQuestiontype in the questionnaire system, including backend model, serialization, designer form controls, and frontend UI integration. The changes enable date and date-time questions with validation, customizable formats, and localization. The most important changes are grouped below:Backend Model & Serialization:
DateQuestionmodel with fields for minimum/maximum date, format presets, and initial value, including JSON serialization and deserialization (date_question.dart,date_question.g.dart,date_format_preset.dart). [1] [2] [3]DateQuestionin the questionnaire question factory and exported it in the questions module (question.dart,questions.dart). [1] [2]Designer Form Integration:
question_form_controller.dart). [1] [2] [3] [4]Frontend UI Integration:
DateQuestionWidgetfor the app, supporting date and time picking, validation, formatting, clearing, and submission, with localization support (date_question_widget.dart,question_container.dart). [1] [2] [3]Localization:
app_en.arb,app_localizations.dart,app_localizations_en.dart,app_localizations_de.dart). [1] [2] [3] [4]Miscellaneous:
question_form_controller.dart).These changes collectively enable robust date and date-time questions in both the study designer and participant app, with full localization and validation support.