Added parameter feature to vanilla-calendar
Vanilla JS Calendar is a package written in vanilla JavaScript with zero dependencies.
Project has started last summer. Owner of the repository is inviting everyone to contribute.
Usage
<div id="v-cal">
<div class="vcal-header">
<button class="vcal-btn" data-calendar-toggle="previous">
<svg height="24" version="1.1" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"></path>
</svg>
</button>
<div class="vcal-header__label" data-calendar-label="month">
March 2017
</div>
<button class="vcal-btn" data-calendar-toggle="next">
<svg height="24" version="1.1" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z"></path>
</svg>
</button>
</div>
<div class="vcal-week">
<span>Mon</span> <span>Tue</span><span>Wed</span> <span>Thu</span> <span>Fri</span> <span>Sat</span> <span>Sun</span>
</div>
<div class="vcal-body" data-calendar-area="month"></div>
</div>
<script src="vanillaCalendar.js" type="text/javascript"></script>
<script>
window.addEventListener('load', function () {
vanillaCalendar.init();
})
</script>
Install dependencies
npm install
Watch JS/CSS
npm run watch
New Features
-Selection of past dates and parameters
It was not possible to choose past dates on the calendar. The changes made it possible. Plus, they are now controlled by a parameter.
For now, we only have disablePastDays parameter. We will add more parameters in the future according to changing needs:
Usage of parameter:
var params = {
disablePastDays: true
};
vanillaCalendar.init(params);
Following pull request includes all related commits:
https://github.com/chrisssycollins/vanilla-calendar/pull/8
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
Please put in more work in your future contributions.
You can contact us on Discord.
[utopian-moderator]
Hey @alperblacktshirt I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Congratulations @alperblacktshirt! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Award for the number of upvotes received
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP