Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(b-calendar): add a parameter to the calendar to display 6 weeks#7155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Tarrask wants to merge2 commits intobootstrap-vue:dev
base:dev
Choose a base branch
Loading
fromPlumettaz:dev
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletionsrc/components/calendar/calendar.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -159,6 +159,8 @@ export const props = makePropsConfigurable(
// Day of week to start calendar on
// `0` (Sunday), `1` (Monday), ... `6` (Saturday)
startWeekday: makeProp(PROP_TYPE_NUMBER_STRING, 0),
// always display 6 weeks even when a month only have 5
alwaysSixWeeks: makeProp(PROP_TYPE_BOOLEAN, false),
// Variant color to use for today's date (defaults to `selectedVariant`)
todayVariant: makeProp(PROP_TYPE_STRING),
// Always return the `v-model` value as a date object
Expand DownExpand Up@@ -460,7 +462,7 @@ export const BCalendar = extend({
const weekOffset = (this.computedWeekStarts > startIndex ? 7 : 0) - this.computedWeekStarts
// Build the calendar matrix
let currentDay = 0 - weekOffset - startIndex
for (let week = 0; week < 6 && currentDay < daysInMonth; week++) {
for (let week = 0; week < 6 &&(this.alwaysSixWeeks ||currentDay < daysInMonth); week++) {
// For each week
matrix[week] = []
// The following could be a map function
Expand Down
4 changes: 4 additions & 0 deletionssrc/components/calendar/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,10 @@
"component": "BCalendar",
"version": "2.5.0",
"props": [
{
"prop": "alwaysSixWeeks",
"description": "When `false`, the number of weeks in a month will be 5 or 6 to avoid displaying a while week of the next month. When `true`, always display 6 weeks per month, event if the current month have 5 weeks. THis prevent layout shift when navigating from month to month"
},
{
"prop": "block",
"description": "Makes the calendar full width"
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp