Comments (12)
@alexis-landrieu-avanade I've added the export
flag and that seems to work (tested it using your sample)! fix released in v9.0.22
. thanks much for your help.
from mat-datetimepicker.
@bbortt I think the Theming part of the README.md file must be updated,
Theming
@use '@mat-datetimepicker/core/datetimepicker/datetimepicker-theme' as matdp;
// Using the $theme variable from the pre-built theme you can call the theming function
@include matdp.mat-datetimepicker-theme($theme);
@JorgeAlcarazKuv see full example
from mat-datetimepicker.
@bbortt unfortunately none of these solutions seems to be working. You will find below a repo with clean Angular project to see the issue.
Possible related topic
from mat-datetimepicker.
@alexis-landrieu-avanade the following works for me, even with your example..
$ git diff
diff --git a/angular.json b/angular.json
index 87247ee..547a091 100644
--- a/angular.json
+++ b/angular.json
@@ -34,6 +34,11 @@
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"src/styles.scss"
],
+ "stylePreprocessorOptions": {
+ "includePaths": [
+ "node_modules"
+ ]
+ },
"scripts": []
},
"configurations": {
diff --git a/src/styles.scss b/src/styles.scss
index 275fdf7..ab5fd42 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -2,7 +2,7 @@
@use '@angular/material' as mat;
-// @use '@mat-datetimepicker/core/datetimepicker/datetimepicker-theme' as mat2;
-@import '~@mat-datetimepicker/core/datetimepicker/datetimepicker-theme.scss';
+@use '@mat-datetimepicker/core/datetimepicker/datetimepicker-theme.scss';
@include mat.core();
from mat-datetimepicker.
@bbortt I confirm it's working (you can see the build result here), but it's a bit weird why we have to include node_modules in stylePreprocessorOptions ? Are you sure it's not your responsibility to export styles, refer to this documentation ng-packagr - Copy assets - Exporting Styles ?
from mat-datetimepicker.
I confirm it's working 🥇 , thank you for the update .
from mat-datetimepicker.
the problem sounds like a sass-loader
(respecitvely Angular) migration error to me.. because the style-sheet clearly exists:
$ cat package.json | grep @mat-datetimepicker
"@mat-datetimepicker/core": "^9.0.21",
$ ls -alh node_modules/\@mat-datetimepicker/core/datetimepicker/ | grep datetimepicker-theme.scss
-rw-r--r-- 1 bbortt bbortt 1.4K Oct 26 1985 datetimepicker-theme.scss
there's multiple changes involved here.. and multiple fixes possible. e.g. removing the leading ~
, using @use
instead (@import
has been deprecated) or even adding the stylePreprocessorOptions
to angular.json
. please lookup the individual solutions to find out what works best for you!
I do take from this issue, that our documentation is not up to date. I'll have that fixed in the meantime.
from mat-datetimepicker.
thanks very much for the sample! I'll have a look at it..
from mat-datetimepicker.
it's a sass mixin, so I think we should. but I am not sure if stylePreprocessorOptions
really is redundant after that.
edit: anyway, I will test it as soon as I find some time.. or feel free to open a PR 😉
from mat-datetimepicker.
@alexis-landrieu-avanade @bbortt Im still having this problem using the latest versions of Angular and @mat-datepicker.
Did you manage to make this work without the stylePreprocessorOptions bit? Could you provide an example?
from mat-datetimepicker.
I should be resolved as @alexis-landrieu-avanade showed in the link provided.. please double check your settings.
from mat-datetimepicker.
that is probably true..
from mat-datetimepicker.
Related Issues (20)
- use prettier rule "eslint:recommended"
- GHA standard-version cannot push HOT 2
- fix publish github action pipeline HOT 4
- moment project is dependant on angular 13.1.1 instead of latest (13.2.1) HOT 3
- remove deprecated standard-version
- Upgrading to angular 14 HOT 2
- make Releases and CHANGELOG less-noisy and more readable HOT 3
- Unable to import @import '~@mat-datetimepicker/core/datetimepicker/datetimepicker-theme.scss'; HOT 5
- Angular 15 not supported HOT 7
- BC released in a minor HOT 13
- ERROR Error: Cannot find control with unspecified name attribute HOT 3
- npm install --save @angular/material-moment-adapter mat-datetimepicker/moment HOT 1
- Can I select the seconds? HOT 1
- Suggestion to Add DateFns Support HOT 2
- Problem with dependecies for @mat-datetimepicker/moment with @angular/material HOT 1
- Support Angular 17 HOT 4
- Locale text
- Wrong Dependency on @mat-datetimepicker/moment HOT 2
- Can't update to Angular 18 HOT 5
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 mat-datetimepicker.