Unable to see .DayPicker-Day--start or --end on divs
See original GitHub issueDescribe the bug
I am trying to style the start and end selected dates for a range differently than the others in the range. However, when I inspect the DatePicker using chrome dev tools, I only see DatePicker-Day--selected
on the beginning and end dates and no --start
or --end
classes, so my custom styles will not apply. There does not seem to be any distinguishing elements in the classnames.
Expected behavior
.DatePicker-Day--start
and .DatePicker-Day--end
to be applied to the start and end of range of dates.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Jquery UI Datepicker not displaying - Stack Overflow
If I change the display:none to display:block the datepicker works fine except it dosen't close when I select a date. Jquery libraries in...
Read more >Date Range Picker — JavaScript Date & Time Picker Library
To get started, include jQuery, Moment.js and Date Range Picker's files in ... maxSpan : (object) The maximum span between the selected start...
Read more >DatePicker 1 Must be before DatePicker 2 in Kendo UI for jQuery
I want to perform this validation on two dates that are in a Grid that uses the Default Popup Editor (which automatically applies...
Read more >Discussion - Litepicker
I'm trying to figure out how to use the setDateRange function. ... element: document.getElementById('date'), dateRange:function(start,end,force){today,'2022-03-23 ...
Read more >Date Range Picker — JavaScript Date & Time Picker Library
You can programmatically update the startDate and endDate in the picker using the setStartDate and setEndDate methods. You can access the Date Range...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@darkLord19 In the codebase I’m working on, we increase the specificity by targeting the days that can be selected. So given:
https://github.com/gpbl/react-day-picker/blob/750f6cd808b2ac29772c8df5c497a66e818080e8/src/style.css#L179-L184
We could have something like this (using Sass nesting):
The
--outside
modifier refers to days outside of the current month:https://github.com/gpbl/react-day-picker/blob/750f6cd808b2ac29772c8df5c497a66e818080e8/src/Month.js#L87
@razh thank you so much. I was able to achieve desired behavior using this method!