Giter Site home page Giter Site logo

hsuanxyz / ion2-calendar Goto Github PK

View Code? Open in Web Editor NEW
557.0 21.0 274.0 3.23 MB

📅 A date picker components for ionic2 /ionic3 / ionic4

Home Page: https://hsuanxyz.github.io/demo/ion2-calendar/

License: MIT License

TypeScript 63.16% JavaScript 1.64% HTML 2.07% SCSS 33.13%
ionic2 calendar datepicker daterangepicker daterange ionic range angular angular2 angular4

ion2-calendar's Introduction

📅 ion2-calendar

Build Status Dependency Status NPM version Downloads MIT License

date

English is not my native language; please excuse typing errors. 中文文档

  • Support date range.
  • Support multi date.
  • Support HTML components.
  • Disable weekdays or weekends.
  • Setting days event.
  • Setting localization.
  • Material design.

Support

  • ionic-angular ^3.0.0 2.x
  • @ionic/angular 4.0.0

Demo

live demo click me.

Usage

Installation

$ npm install ion2-calendar moment --save

Import module

import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '@ionic/angular';
import { MyApp } from './app.component';
...
import { CalendarModule } from 'ion2-calendar';

@NgModule({
  declarations: [
    MyApp,
    ...
  ],
  imports: [
    IonicModule.forRoot(),
    CalendarModule
  ],
  bootstrap: [MyApp],
  ...
})
export class AppModule {}

Change Defaults

import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { MyApp } from './app.component';
...
import { CalendarModule } from "ion2-calendar";

@NgModule({
  declarations: [
    MyApp,
    ...
  ],
  imports: [
    IonicModule.forRoot(MyApp),
    // See CalendarComponentOptions for options
    CalendarModule.forRoot({
      doneLabel: 'Save',
      closeIcon: true
    })
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    ...
  ]
})
export class AppModule {}

Components Mode

Basic

<ion-calendar [(ngModel)]="date"
              (change)="onChange($event)"
              [type]="type"
              [format]="'YYYY-MM-DD'">
</ion-calendar>
import { Component } from '@angular/core';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {
  date: string;
  type: 'string'; // 'string' | 'js-date' | 'moment' | 'time' | 'object'
  constructor() { }

  onChange($event) {
    console.log($event);
  }
  ...
}

Date range

<ion-calendar [(ngModel)]="dateRange"
              [options]="optionsRange"
              [type]="type"
              [format]="'YYYY-MM-DD'">
</ion-calendar>
import { Component } from '@angular/core';
import { CalendarComponentOptions } from 'ion2-calendar';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {
  dateRange: { from: string; to: string; };
  type: 'string'; // 'string' | 'js-date' | 'moment' | 'time' | 'object'
  optionsRange: CalendarComponentOptions = {
    pickMode: 'range'
  };

  constructor() { }
  ...
}

Multi Date

<ion-calendar [(ngModel)]="dateMulti"
              [options]="optionsMulti"
              [type]="type"
              [format]="'YYYY-MM-DD'">
</ion-calendar>
import { Component } from '@angular/core';
import { CalendarComponentOptions } from 'ion2-calendar';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {
  dateMulti: string[];
  type: 'string'; // 'string' | 'js-date' | 'moment' | 'time' | 'object'
  optionsMulti: CalendarComponentOptions = {
    pickMode: 'multi'
  };

  constructor() { }
  ...
}

Input Properties

Name Type Default Description
options CalendarComponentOptions null options
format string 'YYYY-MM-DD' value format
type string 'string' value type
readonly boolean false readonly

Output Properties

Name Type Description
change EventEmitter event for model change
monthChange EventEmitter event for month change
select EventEmitter event for click day-button
selectStart EventEmitter event for click day-button
selectEnd EventEmitter event for click day-button

CalendarComponentOptions

Name Type Default Description
from Date new Date() start date
to Date 0 (Infinite) end date
color string 'primary' 'primary', 'secondary', 'danger', 'light', 'dark'
pickMode string single 'multi', 'range', 'single'
showToggleButtons boolean true show toggle buttons
showMonthPicker boolean true show month picker
monthPickerFormat Array ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'] month picker format
defaultTitle string '' default title in days
defaultSubtitle string '' default subtitle in days
disableWeeks Array [] week to be disabled (0-6)
monthFormat string 'MMM YYYY' month title format
weekdays Array ['S', 'M', 'T', 'W', 'T', 'F', 'S'] weeks text
weekStart number 0 (0 or 1) set week start day
daysConfig Array<DaysConfig> [] days configuration

Modal Mode

Basic

Import ion2-calendar in component controller.

import { Component } from '@angular/core';
import { ModalController } from '@ionic/angular';
import {
  CalendarModal,
  CalendarModalOptions,
  DayConfig,
  CalendarResult
} from 'ion2-calendar';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {
  constructor(public modalCtrl: ModalController) {}

  openCalendar() {
    const options: CalendarModalOptions = {
      title: 'BASIC'
    };

    const myCalendar = await this.modalCtrl.create({
      component: CalendarModal,
      componentProps: { options }
    });

    myCalendar.present();

    const event: any = await myCalendar.onDidDismiss();
    const date: CalendarResult = event.data;
    console.log(date);
  }
}

Date range

Set pickMode to 'range'.

openCalendar() {
  const options: CalendarModalOptions = {
    pickMode: 'range',
    title: 'RANGE'
  };

  const myCalendar = await this.modalCtrl.create({
    component: CalendarModal,
    componentProps: { options }
  });

  myCalendar.present();

  const event: any = await myCalendar.onDidDismiss();
  const date = event.data;
  const from: CalendarResult = date.from;
  const to: CalendarResult = date.to;

  console.log(date, from, to);
}

Multi Date

Set pickMode to 'multi'.

openCalendar() {
  const options = {
    pickMode: 'multi',
    title: 'MULTI'
  };

  const myCalendar = await this.modalCtrl.create({
    component: CalendarModal,
    componentProps: { options }
  });

  myCalendar.present();

  const event: any = await myCalendar.onDidDismiss();
  const date: CalendarResult = event.data;
  console.log(date);
}

Disable weeks

Use index eg: [0, 6] denote Sunday and Saturday.

openCalendar() {
  const options: CalendarModalOptions = {
    disableWeeks: [0, 6]
  };

  const myCalendar = await this.modalCtrl.create({
    component: CalendarModal,
    componentProps: { options }
  });

  myCalendar.present();

  const event: any = await myCalendar.onDidDismiss();
  const date: CalendarResult = event.data;
  console.log(date);
}

Localization

your root module

import { NgModule, LOCALE_ID } from '@angular/core';
...

@NgModule({
  ...
  providers: [{ provide: LOCALE_ID, useValue: "zh-CN" }]
})

...
openCalendar() {
  const options: CalendarModalOptions = {
    monthFormat: 'YYYY 年 MM 月 ',
    weekdays: ['天', '一', '二', '三', '四', '五', '六'],
    weekStart: 1,
    defaultDate: new Date()
  };

  const myCalendar = await this.modalCtrl.create({
    component: CalendarModal,
    componentProps: { options }
  });

  myCalendar.present();

  const event: any = await myCalendar.onDidDismiss();
  const date: CalendarResult = event.data;
  console.log(date);
}

Days config

Configure one day.

openCalendar() {
  let _daysConfig: DayConfig[] = [];
  for (let i = 0; i < 31; i++) {
    _daysConfig.push({
      date: new Date(2017, 0, i + 1),
      subTitle: `$${i + 1}`
    })
  }

  const options: CalendarModalOptions = {
    from: new Date(2017, 0, 1),
    to: new Date(2017, 11.1),
    daysConfig: _daysConfig
  };

  const myCalendar = await this.modalCtrl.create({
    component: CalendarModal,
    componentProps: { options }
  });

  myCalendar.present();

  const event: any = await myCalendar.onDidDismiss();
  const date: CalendarResult = event.data;
  console.log(date);
}

API

Modal Options

Name Type Default Description
from Date new Date() start date
to Date 0 (Infinite) end date
title string 'CALENDAR' title
color string 'primary' 'primary', 'secondary', 'danger', 'light', 'dark'
defaultScrollTo Date none let the view scroll to the default date
defaultDate Date none default date data, apply to single
defaultDates Array none default dates data, apply to multi
defaultDateRange { from: Date, to: Date } none default date-range data, apply to range
defaultTitle string '' default title in days
defaultSubtitle string '' default subtitle in days
cssClass string '' Additional classes for custom styles, separated by spaces.
canBackwardsSelected boolean false can backwards selected
pickMode string single 'multi', 'range', 'single'
disableWeeks Array [] week to be disabled (0-6)
closeLabel string CANCEL cancel button label
doneLabel string DONE done button label
clearLabel string null clear button label
closeIcon boolean false show cancel button icon
doneIcon boolean false show done button icon
monthFormat string 'MMM YYYY' month title format
weekdays Array ['S', 'M', 'T', 'W', 'T', 'F', 'S'] weeks text
weekStart number 0 (0 or 1) set week start day
daysConfig Array<DaysConfig> [] days configuration
step number 12 month load stepping interval to when scroll
defaultEndDateToStartDate boolean false makes the end date optional, will default it to the start

onDidDismiss Output { data } = event

pickMode Type
single { date: CalendarResult }
range { from: CalendarResult, to: CalendarResult }
multi Array<CalendarResult>

onDidDismiss Output { role } = event

Value Description
'cancel' dismissed by click the cancel button
'done' dismissed by click the done button
'backdrop' dismissed by click the backdrop

DaysConfig

Name Type Default Description
cssClass string '' separated by spaces
date Date required configured days
marked boolean false highlight color
disable boolean false disable
title string none displayed title eg: 'today'
subTitle string none subTitle subTitle eg: 'New Year\'s'

CalendarResult

Name Type
time number
unix number
dateObj Date
string string
years number
months number
date number

Thanks for reading

ion2-calendar's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ion2-calendar's Issues

Month names customization

Hi, is there a way to customize month's names or use the localization to change them automatically in the correct language?

Custom language for months

I need to translate the months of the calendar to spanish (currently only able to translate the week days). Are you planning to add this feature? Or, if it's currently implemented, how can I configure it?

Can't see it after compiling

Hi. I can use it when running with ionic serve but when compiling with: ionic package build android --profile=production --release --prod it doesn't show on device. Any advice? Thanks.

Previous Month

Hi Hsuan,
Nice plugin. Thanks for your effort.
But I need to see and choose range with previous months days on calendar.
Is it possible??
Also how to make locale language with MMMM-yy ??
and how to disable days after today ??

Choose return date type

Right now, date is return in milliseconds since 1970. Maybe there could be a config option that the user could choose what type of date they would like to return.

Could be DateString, GMTString, ISOString, etc...

Just a feature enhancement.

Calendar not closing when clicking on a date

I don't understand why the calendar needs to close when clicking on a date. It could just return a JSON about that specific date, but closing it makes no sense to me.

Also, wrapping in a component (as someone already said) would make this calendar VERY popular.

Calendar not returning data to Modal

Let me start by saying this is a really great project that you have going here. I have a problem that is outlined below:

I have a button in a Modal that shows the calendar and when I click on the check icon to save the data, nothing is sent back to the Modal. Just to make sure I was doing the right thing, I copied my code to a page verbatim and it worked perfectly on there. Is there any work around for using this component in Modals? My code below

    this.calendarCtrl.openCalendar({
      isRadio: false,
      title: 'PartyUp Calendar',
      monthTitle: ' MMMM-yy',
      weekdaysTitle: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
      from: new Date(),
      cssClass: 'calendar-class',
      to: yearFromNow,
      //isSaveHistory: true,
      closeLabel: 'CANCEL',
    })
      .then((res: any) => {
        console.log(res);
      })
      .catch((err) => {
        console.log("Error", err);
      });

Error con cancel button

When I click the cancel button on the calendar a I get this error
image

This is the calendar config
this.calendarCtrl.openCalendar({ from: new Date(), title: 'Select Date', closeLabel: this.CLOSE, cssClass: 'bookTripCal', weekdaysTitle: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sá"], daysConfig: this.daysConfig, weekStartDay: 1,

The days are straying

i have next options:

  selectDate() {
       this.calendarCtrl.openCalendar({
           title: 'Календарь',
           from: new Date(),
           disableWeekdays: [0, 6],
           weekStartDay: 1,
           weekdaysTitle: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"],
           monthTitle: 'MMMM yyyy',
           closeLabel: '',
       }).then(res => {
           this.selectedDate = new Date(res.date.time).toLocaleDateString();
       });
   }

And the following happens:
1

One bug, I had found

iOS9.3.5,iphone4S, WeChat 6.5.12(微信 6.5.12), ion2-calendar could not be showed.
but iOS10,iphone6,ion2-calendar can be showed,but month's title is abnormal.
android is ok。

在iOS9.3.5,iphone4S, WeChat 6.5.12(微信 6.5.12)环境下,不能显示出来,
但是在ios10,iphone6下可以显示,但是月份的标题(eg:1,2...11,12)显示不正常。
安卓机都能正常显示。

Add custom color option

I love this! I just wish we could pass in a custom hex color, rather than specify an ionic scss variable. Would this be possible as a feature?

Week Start Day

Hi

Very pretty plugin for ionic2 apps, Thank you.

Is there any way to establish the first day of the week?

By default the calendar starts the weeks on Sunday, but in Europe (Spain) it is usual to present the calendars beginning on Monday.

It would be possible to include a configuration variable "weekFirstDay" with values ​​0 for Sunday, 1 for Monday, which allows us to set the starting day of the rendered calendar.

Even an option to set a Locale would be perfect, allowing to set an array of options with the format of the date, or the weekFirstDay that I proposed earlier.

Thank you!

Scroll back not working

Scrolling calendar back to previous month is only possible after scrolling forward.
Tried with ion2-calendar/demo (Android).

有个Bug

手机显示月份乱了。4月没有10月重复。电脑上面没问题。

Date-Range enhancement

Hi thanks for your work!

It would be nice, if the calendar does not close immediatly when a 2nd date for a range is selected. It would be nice if you can see the selected range and then accept with a button.

在ionic2.0beta上 报了n多错误 ...

/ion2-calendar/calendar.model.ts(83,64): Error TS1110: Type expected.
ion2-calendar/calendar.model.ts(116,52): Error TS1110: Type expected.
ion2-calendar/components/calendar.modal.ts(85,34): Error TS1110: Type expected.
ion2-calendar/components/calendar.modal.ts(85,40): Error TS1109: Expression expected.
ion2-calendar/components/month.component.ts(72,30): Error TS1110: Type expected.
ion2-calendar/components/month.component.ts(72,36): Error TS1109: Expression expected.
ion2-calendar/services/calendar.service.ts(205,56): Error TS1110: Type expected.
ion2-calendar/services/calendar.service.ts(206,11): Error TS1005: ':' expected.
ion2-calendar/services/calendar.service.ts(206,72): Error TS1005: ',' expected.
ion2-calendar/services/calendar.service.ts(207,9): Error TS1005: ':' expected.
ion2-calendar/services/calendar.service.ts(207,20): Error TS1005: ',' expected.
ion2-calendar/services/calendar.service.ts(207,40): Error TS1005: ',' expected.
ion2-calendar/services/calendar.service.ts(207,47): Error TS1109: Expression expected.
ion2-calendar/services/calendar.service.ts(214,3): Error TS1128: Declaration or statement expected.
ion2-calendar/services/calendar.service.ts(216,26): Error TS1005: ',' expected.
......

Multi select date.

Would there be any way to make a multi selection of dates? for example 3 or 4 dates

Add predefined selected date

Thank you for create this very useful package.
Please make predefined selected date, like if I want to revise my current input date.
maybe like this

let selectedDate = ['2017-08-16','2017-08-17'];
this.calendarCtrl.openCalendar({
			from:new Date(),
			selected: selectedDate,
			weekdays:["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
			disableWeeks: [0, 6],
			pickMode: 'multi',
		})
			.then( res => {
				console.log(res)
			})
			.catch( () => {} )

thank you

Set from and to dates before opening calendar

Hey! Thank you so much for opening this component. It looks really amazing!
I was wondering if it's possible to leave the from and to dates set, so if the user selects two dates and wants to change, he could then open the calendar up and see the selected dates there, then change.

Thanks once again!

WOW! This looks amazing!

Please keep up the development of this, and consider maybe selling it on the ionic market. I've been looking for a date range picker just like this and it looks so promising! Thanks for all the work!

Moment locale

I didn't manage to load moment locale to translate month name ?
How I can do it ? Where I have to import the import 'moment/locale/fr'; to make it translate ?

Thanks
very good calendar !

looks like the calendar can't get its CSS files

The calendar is not showing properly. I followed the installation instructions for the 2 methodes (Components Mode & Modal Mode) this is how my project looks like :
Lignes added :
- app.module.ts :
import { CalendarModule } from "ion2-calendar

imports: [
BrowserModule,
HttpModule,
CalendarModule,…

- MyPage.ts :
import { CalendarModal, CalendarModalOptions, DayConfig } from "ion2-calendar";
import {CalendarController} from "ion2-calendar/dist";

constructor(
public modalCtrl: ModalController,
)

openCalendar() {

}

- MyPage.html:
<button (click)="openCalendar()">Show Calendar

    <ion-calendar [(ngModel)]="date"
    (onChange)="onChange($event)"
    [type]="type"
    [format]="'YYYY-MM-DD'">

And this is the result i'm getting :

capture d ecran 2017-09-26 a 02 30 18

I already tried to install the older version 1.1 but still getting the same problem.
Thank you in advance for your help

Close calendar when clicking on date

The previous version closed the calendar automatically after picking a date. The new version (2.0.0-beta) has a Cancel and Done menu selection which you have to click on to close the calendar.
Is there an option to close the calendar immediately upon clicking on the selected date (instead of having to choose "Done")?

Getting more done in GitHub with ZenHub

Hola! @hsuanxyz has created a ZenHub account for the HsuanXyz organization. ZenHub is the only project management tool integrated natively in GitHub – created specifically for fast-moving, software-driven teams.


How do I use ZenHub?

To get set up with ZenHub, all you have to do is download the browser extension and log in with your GitHub account. Once you do, you’ll get access to ZenHub’s complete feature-set immediately.

What can ZenHub do?

ZenHub adds a series of enhancements directly inside the GitHub UI:

  • Real-time, customizable task boards for GitHub issues;
  • Multi-Repository burndown charts, estimates, and velocity tracking based on GitHub Milestones;
  • Personal to-do lists and task prioritization;
  • Time-saving shortcuts – like a quick repo switcher, a “Move issue” button, and much more.

Add ZenHub to GitHub

Still curious? See more ZenHub features or read user reviews. This issue was written by your friendly ZenHub bot, posted by request from @hsuanxyz.

ZenHub Board

Calendar is not showing properly after upgrading ionic app-script .

I am developing app using ionic 2.

issue:
calendar is not showing properly when ionic app-script is upgraded to latest version...
latest version is "@ionic/app-scripts": "2.0.0"

but it is working when we install older ionic app-script version
old version is "@ionic/app-scripts": "1.3.8"

So please make this calendar working properly for latest app-script version.

can you add some additional API?

now your confirm button is √,can you render extra API to change confirm button's title, for example: "确定"? and can you render API, change Title's font size, font color,and confirm button's title font size and so on.

现在你的“确定”按钮是打勾,你能提供诸如改变确定按钮标题的API吗?还有改变calendar标题字体颜色、大小、“确定”按钮字体大小颜色、诸如此类的API吗?

Scroll event

This is a superb that you've made !

Can we subcribe to scroll event ? upward and backward before or after infinite load ? and attach daysConfig to it ?

Give option to not wrap in a modal!

It would be awesome if rather than forcing the user to use a modal controller, thy can just use HTML tags to render your calendar in the view. This would allow a lot more flexibility and the user could dictate when the calendar should be dismissed

weekdaysTitle Bug

When I reopen the calendar the days title move, original state:

image


image


image

This is my original array ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sá"]
The week starts on monday

How can I fix this issue? Thank you!

Not working with Ionic 3.6

Hi,

I was trying out your plugin for my Ionic 3.6 app.
When I click the button to open the calendar, I am getting an error saying, that there is no CalendarPage declared in Entry Components.

appointment.html

<!--
  Generated template for the AppointmentsPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar color="primary">
    <ion-title>Upcoming Appointments</ion-title>
  </ion-navbar>

</ion-header>


<ion-content padding>
  <ion-list>
    <ion-item (tap)="openCalendar()" >
      Current Date: {{curDate | date: 'dd-MMM-yyyy'}}
    </ion-item>
  </ion-list>
</ion-content>

appointment.ts

import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { CalendarController } from "ion2-calendar/dist";
/**
 * Generated class for the AppointmentsPage page.
 *
 * See http://ionicframework.com/docs/components/#navigation for more info
 * on Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-appointments',
  templateUrl: 'appointments.html',
})
export class AppointmentsPage {
  curDate = new Date();
  constructor(public navCtrl: NavController,
    public navParams: NavParams,
    public calendarCtrl: CalendarController) {
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad AppointmentsPage');
  }
  openCalendar() {
    this.calendarCtrl.openCalendar({
      from: new Date()
    })
      .then(res => { console.log(res) });
  }
}

appointment.module.ts

import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { AppointmentsPage } from './appointments';
import { CalendarModule, CalendarPage } from "ion2-calendar";
@NgModule({
  declarations: [
    AppointmentsPage
  ],
  imports: [
    CalendarModule,
    IonicPageModule.forChild(AppointmentsPage),
  ],
})
export class AppointmentsPageModule {}

Ionic Information

 @ionic/cli-utils  : 1.8.0
    ionic (Ionic CLI) : 3.8.0

global packages:

    Cordova CLI : 6.5.0

local packages:

    @ionic/app-scripts : 2.1.3
    Cordova Platforms  : android 6.1.2
    Ionic Framework    : ionic-angular 3.6.0

System:

    Node : v8.1.0
    npm  : 5.0.3
    OS   : Windows 10

Screenshots

Appointment Page Before Clicking On Date

calendar 1

Appointments Page After Clicking On Date [Error]

calendar 2 error

Feature enhancement

It would be nice, if we can select multiple day and so get an array in return and also set an array of day to default date.
Thanks !

Show without modal

Hello,

I would like to know how it would be possible to display on a page directly the content of the modal without opening a modal. I would even like to post the calendar on a half page.

thank you

Default title/subtitle for days

Currently you can set a title/subtitle using daysConfig but it would be nice to also set a default title/subtitle for the rest of the days.

Months i18n?

Hi! How can I use i18n? My app is already using moment with the correct i18n layer (it's displaying it well by using it outside the calendar). Thanks!

How to update

How do I update to the last version of the calendar? I did npm install ion2-calendar@latest --save but still have the old version that doesn't have the options to close on top. Is there anything else I need to run to update?

Calendar is not showing

when i build android app with this command :-"ionic cordova run android " ,it is working fine.
but i build using this command :-"ionic cordova run android --prod" ,it is not showing.
"ionic cordova run android --prod" command is used for removing white screen after splash screen, so that app should start faster.

style on iOS

When using on iOS device the numbers for the calendar days distort..is their a css override for the size of this text?
img_5876

Calendar not working with Ionic --prod

With Ionic (latest) it's not possible to get calendar working with Ionic app-scripts-command "--prod".
Without "--prod" it's working correctly, with --aot it's also working.

You can try it with ion2-calendar/demo "ionic cordova run android --prod"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.