Skip to content

Commit 2916e2b

Browse files
authored
feat: new component DateInput (#2003)
* refactor(date-picker): simplify year-picker-panel and improve button logic - Removed unnecessary components and props from year-picker-panel.vue. - Simplified button properties and event handling for year selection. - Updated styles for date-picker components to enhance UI consistency. - Added new locale strings for year and month selection hints. - Adjusted theme variables for better spacing and layout in date-picker. - Enhanced type definitions for datePickerProps and locale messages. * refactor(date-picker): enhance layout and styling for date-picker components * refactor(date-picker): update panel header classes and improve styling - Changed class names in panel-header.vue for year and month navigation to use a unified 'nav' class. - Simplified month value button structure in panel-header.vue. - Updated snapshot tests to reflect changes in class names. - Adjusted CSS variables for date-picker theme to remove unnecessary padding variables and streamline styles. - Removed '--date-picker-body-padding-no-title' variable from style definitions as it is no longer used. * refactor(date-picker): adjust body height to improve layout consistency * refactor(date-picker): add min-height for day-picker content items * refactor(date-picker): update styling variables for improved consistency and readability * refactor(date-picker): adjust month and year picker item dimensions for consistency * refactor(date-picker): reorganize month and year picker examples for clarity * refactor(date-picker): rename event handlers and update emit names for consistency * refactor(date-picker): implement resetPreview method and update actions slot in documentation * refactor(date-picker): update component props and remove disabled button styles - Renamed `ComponentProps` to `DatePickerProps` for clarity. - Updated references in day, month, and year picker panels to use `datePickerProps`. - Removed disabled button styles from LESS files to streamline button appearance. - Simplified button click handlers by removing event parameter checks for disabled state. * refactor(date-picker): improve type safety and rename functions for clarity * refactor(date-picker): update onPreview event to include dayOfMonth parameter and improve documentation * refactor(date-picker): update date picker components to use enums for types and improve type safety - Replaced string literals with enum values for date picker types and units in DatePicker.vue, props.ts, and related components. - Introduced new constants for date picker formats and shift directions. - Updated type definitions for props and state management to enhance clarity and maintainability. - Refactored logic in day, month, and year picker panels to utilize new constants and types. - Improved overall code consistency and readability across the date picker module. * feat(date-input): add DateInput component with standard, outlined, and filled variants - Implemented DateInput component for date selection with various features including multiple and range selection. - Added documentation in English and Chinese for the DateInput component. - Created example usage for DateInput showcasing different variants and functionalities. - Introduced localization support for English and Chinese languages. - Defined props and types for DateInput component to enhance type safety and usability. * refactor(date-input): enhance date input component with improved styling, validation, and support for various date formats * refactor(date-input): simplify logic for handling multiple and range selections in DateInput component * refactor(date-input): improve handling of model value shape in DateInput component tests * refactor(date-input, date-picker): enhance type safety and improve handling of undefined values in DateInput and DatePicker components * feat(date-picker): add month and year range selection support - Introduced new range selection for month and year types in DatePicker component. - Updated example files to demonstrate month and year range selection. - Added corresponding localization for month and year range placeholders. - Enhanced styles for date picker body to support scrollbar visibility. - Updated documentation to reflect new features and usage examples. * feat(date-picker): add allowed dates functionality and prevent selection of disabled values - Implemented `allowed-dates` prop to restrict selectable values in date picker. - Added tests to ensure that disabled values are not emitted when selected. - Enhanced date picker to prevent default pointer down behavior. - Updated documentation for `allowed-dates` to clarify its usage. - Introduced new calendar icon for improved UI consistency. feat(date-input): enhance date input with new features - Added support for min/max date range selection in date input. - Introduced custom range separator for date range selection. - Implemented allowed dates functionality to restrict selectable dates. - Updated examples and documentation to reflect new features. fix(form): apply outlined variant to form inputs for better styling - Updated form input components to use outlined variant for consistency. - Enhanced user experience by ensuring all inputs have a uniform appearance. chore(icons): add new calendar icon for date input and picker components * refactor(date-picker, date-input): replace pointerdown with mousedown events and enhance type safety for onChange handlers * feat(date-input): add datetime type support with time selection - Introduced a new `datetime` type for the date input component, allowing users to select both date and time. - Added a time selector with hours, minutes, and optional seconds. - Implemented props for `use-seconds`, `allowed-times`, `min`, and `max` to constrain time selection. - Updated styles for the new time input fields and their interactions. - Enhanced documentation in both English and Chinese to cover the new datetime functionality. - Added examples demonstrating the usage of the datetime input in the example section. * refactor(date-picker): update adjacent item color to use HSLA for better contrast * refactor(date-picker): replace mousedown with pointerdown events and improve adjacent item color contrast * refactor(date-input): replace TimeField with TimeSelect and update styles - Updated test cases to use TimeSelect instead of TimeField in date-input tests. - Refactored CSS variables and styles to reflect the change from TimeField to TimeSelect. - Enhanced documentation to clarify the use of multiple date selection. - Added new components for DayPickerPanel, MonthPickerPanel, PanelHeader, and YearPickerPanel to improve date picker functionality. * refactor(date-input): add missing style imports for improved component styling * refactor(date-picker): update selection state management and improve component structure - Refactored DatePicker component to use a reactive selection state object for managing selected dates, years, and months. - Updated all related components (DayPickerPanel, MonthPickerPanel, YearPickerPanel) to utilize the new selection state structure. - Renamed methods for selecting days, months, and years to improve clarity (e.g., chooseDay -> selectDay). - Adjusted computed properties and methods to reflect changes in state management. - Enhanced the test suite to align with the new selection state structure and method names. * refactor(date-picker): rename variables for clarity and improve type consistency across components * refactor(date-input): update modelValue to use Date object for improved clarity * feat(date-input): enhance datetime input functionality and styling * feat(date-input): enhance datetime input with allowed time validation and range support * feat(date-input): add validation for reversed date range input and allow equal endpoints * test(date-input): add tests for disabling range time selects until dates are completed * feat(form): add datetime range input support and localization messages * refactor(date-input): rename rangeTimeSelectDisabled to isRangeTimeSelectDisabled and update related logic
1 parent 2df8122 commit 2916e2b

68 files changed

Lines changed: 8620 additions & 3066 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)