Comments (3)
Hi @chikakow
Thanks for pointing out this issue.
I was trying to make luxon
compatible to Date.getDay which returns 0
for Sunday.
It seems that the fix needs to consider that for luxon, the weekday
states
Get the day of the week. 1 is Monday and 7 is Sunday
also the NativeDateAdapter
uses 0 = Sunday, 1 = Monday
for the getFirstDayOfWeek
so the fix would look like:
getDayOfWeek(date: DateTime): number {
return date.weekday === 7 ? 0 : date.weekday;
}
what do you think?
from angular.
Yes that code works.
The previous code
date.weekday - 1
was actually creating off by 1 problem with the picker. May 22nd is Saturday
With the new code you provided above, It falls into Saturday.
from angular.
Great news @chikakow you can try @matheo/[email protected]
which includes this fix :)
from angular.
Related Issues (20)
- Overflowing content in date range picker HOT 2
- Touch and drag support for Time picker HOT 3
- Wrong time selected after click on the edge of number element
- Build warning: The same color styles are generated multiple times HOT 1
- Optional streams act as though they are required. HOT 1
- Datepicker with seconds HOT 2
- Datepicker MAT_DATE_FORMATS HOT 6
- Datepicker Angular 13 support HOT 8
- Quarter selection functionality
- Day remains selected when switching month even when out of min, max range HOT 1
- How to use datetime with date range picker?
- 13.0.0-beta.0 does not support Luxon version 2 and up HOT 1
- Hour formatting is without '0' in front of the hour
- Filter display opacity doesn't match with the filter value and click is not disabled
- Expose the users pre-selected dateTime value whenever a pre-selection is made
- Build error TS2720: Class 'MatDateRangeInput<D>' incorrectly implements class 'MatFormFieldControl<DateRange<D>>' HOT 1
- Support Multiple Time Formats HOT 1
- Angular 14 doesn't support. HOT 2
- Angular v15 Material API Changes Causes Production Build Design Issues HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular.