Closed ghost closed 5 years ago
Merging #7 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #7 +/- ##
=======================================
Coverage 78.88% 78.88%
=======================================
Files 16 16
Lines 895 895
Branches 205 205
=======================================
Hits 706 706
Misses 189 189
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update d5d4318...0a25fc6. Read the comment docs.
Hi
This component has nothing to do with the todayBtnTxt. You can check it from here: https://github.com/kekeh/angular-mydatepicker/search?q=todayBtnTxt&unscoped_q=todayBtnTxt
You cannot use that option with this datepicker. All options: https://github.com/kekeh/angular-mydatepicker#options-attribute
hi, surprisingly, this.myDatePickerOptions['todayBtnTxt'] = 'today'
; is working as expected.
Your code works, but you don't need to set that option, because that option is not included to angular-mydatepicker component. The todayBtnTxt option is in the mydatepicker component and it is totally different component. So I have removed the todayBtnTxt option from the angular-mydatepicker.
As you can see here https://kekeh.github.io/angular-mydatepicker/ there is no longer today button on calendar.
Today button is only mydatepicker component: http://kekeh.github.io/mydatepicker/
in my component , i have these below code and it is working :
import {IAngularMyDpOptions, IMyDateModel} from 'angular-mydatepicker';
myDatePickerOptions: IAngularMyDpOptions = {};
this.myDatePickerOptions['todayBtnTxt'] = '오늘';
// i need to change the default text
I am just wondering how this above could work if todayBtnTxt
is not included in angular-mydatepicker
component.`
btw. I have both "angular-mydatepicker": "0.0.11",
and "ngx-mydatepicker": "^2.4.5",
in my package.json.
// This creates a new property todayBtnTxt to options and it works in your code, but not in angular-datapicker
this.myDatePickerOptions['todayBtnTxt'] = '오늘';
// This tries use existing property and it fails because there is not that property
this.myDatePickerOptions.todayBtnTxt = '오늘';
If you use both components in same controller you can define own options to both components.
this.myDatePickerOptions.todayBtnTxt = 'today';
is breaking due to not defined in the type. but I can use this temporarily:this.myDatePickerOptions['todayBtnTxt'] = 'today';
it is better to add the
todayBtnTxt
back to the type.