All Projects → write2sv → ionic4-date-picker

write2sv / ionic4-date-picker

Licence: MIT license
Calendar date picker for Ionic4 apps

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to ionic4-date-picker

ionic4-datepicker
Ionic 4 Datepicker component
Stars: ✭ 78 (+225%)
Mutual labels:  calendar, datepicker, ionic4
Calendar
📆 calendar 日历
Stars: ✭ 119 (+395.83%)
Mutual labels:  calendar, datepicker
React Numpad
A numpad for number, date and time, built with and for React.
Stars: ✭ 117 (+387.5%)
Mutual labels:  calendar, datepicker
Things Calendar
Simple but elegant datepicker for the web — inspired by Things for mac
Stars: ✭ 165 (+587.5%)
Mutual labels:  calendar, datepicker
Core Components
Accessible and lightweight Javascript components
Stars: ✭ 85 (+254.17%)
Mutual labels:  calendar, datepicker
Persiandatepicker
An Android DatePicker for Persian Calendar
Stars: ✭ 86 (+258.33%)
Mutual labels:  calendar, datepicker
React Native Dates
React Native date / daterange picker and calendar
Stars: ✭ 145 (+504.17%)
Mutual labels:  calendar, datepicker
React Calendar
A React Native inspired date list renderer
Stars: ✭ 34 (+41.67%)
Mutual labels:  calendar, datepicker
React Datepicker2
react datepicker component.(include persian jalaali calendar)
Stars: ✭ 191 (+695.83%)
Mutual labels:  calendar, datepicker
Hotel Datepicker
Date range picker for hotels
Stars: ✭ 202 (+741.67%)
Mutual labels:  calendar, datepicker
Datepicker
Get a date with JavaScript! A datepicker with no dependencies.
Stars: ✭ 212 (+783.33%)
Mutual labels:  calendar, datepicker
Vue Draggablecal
Not your ordinary datepicker. A Vuejs draggable date selector with a fresh responsive design, mobile ready and 0 dependencies, 17kb gzipped
Stars: ✭ 79 (+229.17%)
Mutual labels:  calendar, datepicker
Horizontal Calendar
A material horizontal calendar view for Android based on RecyclerView
Stars: ✭ 1,155 (+4712.5%)
Mutual labels:  calendar, datepicker
Pg Calendar
📆 beautiful and eidetic date picker
Stars: ✭ 109 (+354.17%)
Mutual labels:  calendar, datepicker
Laydate
layDate(日期与时间组件) 是 layui 独立维护的三大组件之一
Stars: ✭ 1,066 (+4341.67%)
Mutual labels:  calendar, datepicker
React Calendar
React.js Calendar Component (npm install react-calendar-component) 📅
Stars: ✭ 142 (+491.67%)
Mutual labels:  calendar, datepicker
Vue Datepicker Ui
Datepicker Component For Vue
Stars: ✭ 252 (+950%)
Mutual labels:  calendar, datepicker
Vue Calendar
🏆 基于 vue 2.0 开发的轻量,高性能日历组件
Stars: ✭ 828 (+3350%)
Mutual labels:  calendar, datepicker
Rsdayflow
iOS 7+ Calendar (Date Picker) with Infinite Scrolling.
Stars: ✭ 843 (+3412.5%)
Mutual labels:  calendar, datepicker
React Datepicker
📅 React DatePicker Library (Flexible, Reusable)
Stars: ✭ 165 (+587.5%)
Mutual labels:  calendar, datepicker

Ionic Date Picker Component

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

How to use

1) Install using npm

    npm i ionic4-date-picker --save

2) Add it to your ngModule in .module

import { DatePickerModule } from 'ionic4-date-picker';
   
@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>	

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].