forked from Dogfalo/materialize
-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhancement(Datepicker) styling refactor #571
Open
gselderslaghs
wants to merge
13
commits into
materializecss:v2-dev
Choose a base branch
from
gselderslaghs:datepicker-styling-refactor
base: v2-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
enhancement(Datepicker) styling refactor #571
gselderslaghs
wants to merge
13
commits into
materializecss:v2-dev
from
gselderslaghs:datepicker-styling-refactor
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… standards materializecss#558; implemented styling for in range (wip) materializecss#360
…ell to initial, implemented additional is-daterange-start + is-daterange-end classes and refactored styling to use pseudo selectors on newly created classes materializecss#360
…ng text field if present materializecss#558
… display font size adjustment when rendering multiple dates
…styling as todos in scss file
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
This issue is a follow up of #558, making great steps towards a M3 compatible datepicker
Changelog
Removed all modal related selectors #525
Refactored styling, removed flex row styling so left face gets on top #558
Refactored tag selectors to class selectors since it has advantages on specificity #558
Implemented date range styling #360
Implemented ability to use user defined end date input field via option
dateRangeEndEl: <selector>
#360Implemented option
openByDefault
#558Implemented input field interaction callback function #525
Implemented functionality to render date format below the field in the input field supporting text section #558
Todos
Handling toggling visibility of the docked picker since open and close is deprecated since v2.2.1 and the event handlers inside the component for handling the interaction open/close should be removed, discussion in #570 about making a global utility function with callback function so it's reusable with multiple components
Examples
Implement datepicker with user defined end date element and supporting text for rendering format:
M.Datepicker.init(document.querySelector('.datepicker'), { isDateRange: true, dateRangeEndEl: '.datepicker-end-date' })
Currently we can work with the callback function for opening and closing in modal (or any specified user element) by using the container option
<dialog class="modal" style="width: 325px"></dialog>
This could also work with the docked Datepicker in
openByDefault: false
state with following example, but would additionally require the cancel/confirm buttons to work, propose to follow up the docked datepicker in #140 after #570 is cleared outTypes of changes
Checklist: