npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ionic4-calendar-picker-honeycombbe

v1.2.3

Published

Ionic 4 Datepicker Calendar Embed

Downloads

8

Readme

Ionic Date Picker Component

This is a date picker component for your Ionic 4 app.

Fixed many issues from Venkata Surya Sagi @ionic4-date-picker

How to use

1) Install using npm

    npm i ionic4-calendar-picker-honeycombbe --save

2) Add it to your ngModule in .module

import { DatePickerModule } from 'ionic4-calendar-picker-honeycombbe';
   
@NgModule({
 ...,
  imports: [
    ....
    DatePickerModule
    ....
  ],
  ....
})

3) Use the directive ionic-calendar-date-picker in your html

    <ionic-calendar-date-picker (onSelect)="dateSelected($event)"></ionic-calendar-date-picker>	

4) Modify Calendar Classes

	Add to global.scss
	
	.ionicCalendarDayLabel
	.ionicCalendarMonthBtn
	.ionicCalendarYearBtn
	.ionicCalendarNext
	.ionicCalendarPrevious
	

Options

(onSelect) - An event that is created when a date is selected. Outputs Date object.

[date] - A date object that sets the selected date in the calendar. (not required. Default is today)

[fromDate] - A date object that sets the min date in the calendar. (not required)

[toDate] - A date object that sets max date in the calendar. (not required)

[monthLabels] - An array of month label strings. (not required. Default is ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];)

[dayLabels] - An array of day label strings. (not required. Default is ['S', 'M', 'T', 'W', 'T', 'F', 'S'];)

[validDates] - An array of Date objects. When this is provided all the other dates will be disabled. The component still respects start date and end date if provided (not required. Default is [];)

Styling Option by Date

[dateStyles] - An Java dictionary representing style (value) for each date in YYYY-MM-DD (key in ISO). For eg: dateStyles = { '2019-04-10': {'background-color': 'red'}, '2019-04-09': {'background-color': 'green'}, '2019-04-08': {'background-color': 'blue'}, }; Hint: You can use toDate().toISOString().slice(0,10) on your Date object to quickly get the key.

Styling Options

  <ionic-calendar-date-picker [notInCalendarStyle]="{'color': 'red', 'font-weight': 'bold'}"></ionic-calendar-date-picker>

None of these are required options.

[backgroundStyle] - Background color of the component. Default: { 'background-color': '#ffffff' };

[notInCalendarStyle] - When a day is not in the calendar. Default: { 'color': '#8b8b8b' };

[dayLabelsStyle] - Day Label styling (S, M, T, W ... ). Default: { 'font-weight': 500, 'font-size': '14px' };

[monthLabelsStyle] - Month Label Styling (Jan, Feb, Mar ... ). Default: { 'font-size': '15px' };

[yearLabelsStyle] - Year Label Styling (2000, 2001 ...). Default: { 'font-size': '15px' };

[itemSelectedStyle] - Styling on selected Item by the user. Default: { 'background': '#488aff', 'color': '#f4f4f4 !important' };

[todaysItemStyle] - Styling on showing todays Day, Month, Year. Default: { 'color': '#32db64' };

[invalidDateStyle] - Styling on invalid Dates when you provide validDates input. Default: { 'text-decoration': 'line-through', 'color': 'red' };

4) Pictures

Day Selection Year Selection Month Selection Demo