File tree 3 files changed +17
-6
lines changed
3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 10
10
:is-date-range =" true"
11
11
:is-multiple =" true"
12
12
:calendars-count =" 2"
13
+ :marked-date-range =" {start: '22.4.2019', end: '24.4.2019'}"
13
14
ref =" calendar"
14
15
></functional-calendar >
15
16
<blockquote >
79
80
80
81
.demo-calendar {
81
82
margin : 80px 50px ;
82
- width : 635 px
83
+ width : 735 px
83
84
}
84
85
85
86
pre {
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ input.vfc-single-input {
230
230
}
231
231
232
232
& .vfc-marked {
233
- & .borderd {
233
+ & .vfc- borderd , & .vfc-start-marked , & .vfc-end-marked {
234
234
& :before {
235
235
background : transparent ;
236
236
}
Original file line number Diff line number Diff line change 623
623
classes .push (' vfc-marked' );
624
624
}
625
625
626
+ if (this .fConfigs .markedDates .includes (day .date )){
627
+ classes .push (' vfc-borderd' );
628
+ }
629
+
626
630
// Date Range Marked
627
631
if (this .fConfigs .markedDateRange .start && this .fConfigs .markedDateRange .end ) {
628
632
if (helpCalendar .getDateFromFormat (this .fConfigs .markedDateRange .start ) <= helpCalendar .getDateFromFormat (day .date )
629
633
&& helpCalendar .getDateFromFormat (this .fConfigs .markedDateRange .end ) >= helpCalendar .getDateFromFormat (day .date )) {
630
634
classes .push (' vfc-marked' );
631
635
}
636
+
637
+ if (day .date === this .fConfigs .markedDateRange .start ){
638
+ classes .push (' vfc-start-marked' );
639
+ }else if (day .date === this .fConfigs .markedDateRange .end ){
640
+ classes .push (' vfc-end-marked' );
641
+ }
632
642
} else {
633
643
634
644
// Only After Start Marked
660
670
}
661
671
662
672
if (day .date === this .calendar .dateRange .start ){
663
- classes .push (' vfc-start-date ' )
673
+ classes .push (' vfc-start-marked ' );
664
674
}
665
675
666
676
if (day .date === this .calendar .dateRange .end ){
667
- classes .push (' vfc-end-date ' )
677
+ classes .push (' vfc-end-marked ' );
668
678
}
669
679
670
- if (day .date === this .calendar .dateRange . start || day . date === this . calendar . dateRange . end || day . date === this . calendar . selectedDate ){
671
- classes .push (' borderd' );
680
+ if (day .date === this .calendar .selectedDate ){
681
+ classes .push (' vfc- borderd' )
672
682
}
673
683
674
684
return classes;
You can’t perform that action at this time.
0 commit comments