
Product
Introducing Socket Scanning for OpenVSX Extensions
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.
@meveo-org/mv-calendar
Advanced tools
MvCalendar is a Meveo calendar component (based on lit-element) that renders a datepicker component that can display a simple calendar, a calendar with date range, or a datepicker popup in an input field.
MvCalendar is a Meveo calendar component (based on lit-element) that renders a datepicker component that can display a simple calendar, a calendar with date range, or a datepicker popup in an input field.
To experiment with the MvCalendar component.
Clone this repo.
Serve the project from the root directory with some http server (best served with meveo itself)
The mv-calendar has 3 type variants:
default, dropdown, and range
The default calendar will display a simple calendar on the page.
<mv-calendar
name="singleCalendar" // name that is returned in select-date event details
placeholder="Single Calendar" // the placeholder text when input is empty
inline-input // displays an inline input at the top of the calendar
monday-first // changes the first column to Monday instead of Sunday
allow-partial // allows entering and selecting partial dates(year only, year and month only)
min-year="2010" // minimum year allowed in the year input
max-year="2030" // maximum year allowed in the year input
pattern="MM/DD/YYYY" // the date pattern used for masking and formatting the date
pattern-matcher="MDY" // specify which characters in the pattern are editable
pattern-regex="\\d" // specify regex used for characters allowed in the pattern
?has-error="${this.hasError}" // optional - boolean to indicate if the input date has an error
.theme="${theme}" // theme used in displaying the calendar (light or dark)
.selected="${this.selectedDate}" // the Date object that specifies the value of the calendar
@select-date="${this.changeDate}" // custom event dispatched when a date is selected/entered
></mv-calendar>
The dropdown calendar will display an input field which pops out a calendar dropdown when focused.
<mv-calendar
name="singleCalendar" // name that is returned in select-date event details
dropdown // specifies that this is a dropdown calendar
placeholder="Dropdown Calendar" // the placeholder text when input is empty
monday-first // changes the first column to Monday instead of Sunday
allow-partial // allows entering and selecting partial dates(year only, year and month only)
min-year="2010" // minimum year allowed in the year input
max-year="2030" // maximum year allowed in the year input
pattern="MM/DD/YYYY" // the date pattern used for masking and formatting the date
pattern-matcher="MDY" // specify which characters in the pattern are editable
pattern-regex="\\d" // specify regex used for characters allowed in the pattern
?has-error="${this.hasError}" // optional - boolean to indicate if the input date has an error
.theme="${theme}" // theme used in displaying the calendar (light or dark)
.selected="${this.selectedDate}" // the Date object that specifies the value of the calendar
@select-date="${this.changeDate}" // custom event dispatched when a date is selected/entered
></mv-calendar>
The range calendar will display a component with two calendars that allow the user to choose a start and end date range.
<mv-calendar
name="rangeCalendar" // name that is returned in select-date event details
range-calendar // specifies that this is a range calendar
inline-input // displays an inline input at the top of the calendar
.start="${this.start}" // contains the start values and properties
.end="${this.end}" // contains the end values and properties
monday-first // changes the first column to Monday instead of Sunday
allow-partial // allows entering and selecting partial dates(year only, year and month only)
pattern="MM/DD/YYYY" // the date pattern used for masking and formatting the date
pattern-matcher="MDY" // specify which characters in the pattern are editable
pattern-regex="\\d" // specify regex used for characters allowed in the pattern
.theme="${theme}" // theme used in displaying the calendar (light or dark)
@select-date="${this.changeDate}" // custom event dispatched when a date is selected/entered
></mv-calendar>
The selected attribute's value should have the following details:
{
date, // optional - the javascript Date object if a full date is selected
year, // the full year value
month, // the month value (0-11)
day // the day value (0-31)
}
The for range calendars, the start and end attributes' values should have the following details:
{
selected: {
date, // optional - the javascript Date object if a full date is selected
year, // the full year value
month, // the month value (0-11)
day // the day value (0-31)
},
placeholder, // the placeholder text when input is empty
hasError, // optional - boolean to indicate if the input date has an error
minYear, // minimum year allowed in the year input
maxYear, // maximum year allowed in the year input
}
For single calendars, the select-date custom event's detail has the following values:
const {
detail: {
name, // the value of the name attribute declared in the component
selected: {
date, // the javascript Date object if a full date is selected
year, // the full year value
month, // the month value (0-11)
day // the day value (0-31)
},
}
} = event;
For range calendars, the select-date custom event's detail has the following values:
const {
detail: {
name, // the value of the name attribute declared in the component
selected: {
start: {
date, // the javascript Date object if a full date is selected
year, // the full year value
month, // the month value (0-11)
day // the day value (0-31)
},
end: {
date, // the javascript Date object if a full date is selected
year, // the full year value
month, // the month value (0-11)
day // the day value (0-31)
},
}
}
} = event;
You can also check this demo
FAQs
MvCalendar is a Meveo calendar component (based on lit-element) that renders a datepicker component that can display a simple calendar, a calendar with date range, or a datepicker popup in an input field.
We found that @meveo-org/mv-calendar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies