Open jacobfederer opened 5 years ago
did you import tokens for my datepicker from my package??
Here are my imports:
import {MatMomentDateModule, MomentDateAdapter,} from "@angular/material-moment-adapter"
import {MAT_DATE_FORMATS, MAT_DATE_LOCALE, MatRippleModule,} from "@angular/material/core"
import {
DateAdapter as RangeDateAdapter,
MAT_DATE_FORMATS as RANGE_MAT_DATE_FORMATS,
MAT_DATE_LOCALE as RANGE_MAT_DATE_LOCALE,
SatDatepickerModule
} from 'saturn-datepicker'
They are correct. I guess both datepickers uses the same injection token, regardless of package. Sorry, but I think th e only solution is to wrap my datepicker in component and inject required format to it.
So what I tried using it like so:
@Component({
selector: 'app-some-component',
templateUrl: './some-component.component.html',
styleUrls: ['./some-component.component.scss'],
providers: [
{provide: MAT_DATE_FORMATS, useValue: MOMENTJS_RANGE_DATE_FORMAT}
]
})
This doesn't work for me. Do you have any idea on how to handle this?
Try to provide a MatMomentDateAdapter as DateAdapter in this component. When I have similar task, I just provide a format via moment.js API (according its documentation) instead of angular way
Hi @SaturnTeam ,
Is there an estimate when this bug will be resolved? Or a workaround to solve it...
Regards!
No any estimation.On Jun 12, 2019 3:34 PM, Alonkum notifications@github.com wrote:Hi @SaturnTeam , Is there an estimate when this bug will be resolved? Or a workaround to solve it... Regards!
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.
Hi,
Is there a chance for a short explanation on how you took the Material source code and refactored it? While trying to do so, I've encountered many errors on dependencies...
On Wed, Jun 12, 2019 at 3:47 PM SaturnTeam notifications@github.com wrote:
No any estimation.On Jun 12, 2019 3:34 PM, Alonkum < notifications@github.com> wrote:Hi @SaturnTeam , Is there an estimate when this bug will be resolved? Or a workaround to solve it... Regards!
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SaturnTeam/saturn-datepicker/issues/53?email_source=notifications&email_token=AFS2SEDYCILQFIKLK7WFTIDP2DV67A5CNFSM4GJ2VJS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXQJJSQ#issuecomment-501257418, or mute the thread https://github.com/notifications/unsubscribe-auth/AFS2SEECDW2XR6QP53Q56VLP2DV67ANCNFSM4GJ2VJSQ .
1) I've copypasted the code.
2) use rename.php
to change Mat to Sat
3) manually merge code file by file using 'compare with clipboard' in phpstorm
Thank you for your prompt response! I was wondering though, how did you separate from the rest of the material project? with all the dependencies...
THANK YOU!
On Mon, Jun 17, 2019 at 4:03 PM SaturnTeam notifications@github.com wrote:
- I've copypasted the code.
- use rename.php to change Mat to Sat
- manually merge code file by file using 'compare with clipboard' in phpstorm
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SaturnTeam/saturn-datepicker/issues/53?email_source=notifications&email_token=AFS2SEFT7BUIV2KVJKBOASDP26DT5A5CNFSM4GJ2VJS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX3DCNI#issuecomment-502673717, or mute the thread https://github.com/notifications/unsubscribe-auth/AFS2SEBKTO5L7YKBA27EFCLP26DT5ANCNFSM4GJ2VJSQ .
I didn't. @angular/material
package is in dependencies
I'm trying to display a different format for my date range pickers like so:
Unfortunately only the MAT_DATE_FORMAT is detected by Sat RangePicker. I tried to switch the order which doesn't help in any way. Also overriding the injection token on the component level does not work for me.
How can use different formats for angular material, saturn-datepicker?