Giter VIP home page Giter VIP logo

date-time-picker-dayjs-adapter's Introduction

Angular Date Time Picker (DayJs Adapter)

npm npm

Angular date time picker - DayJs Adpater

The current version of this package supports Angular 17

If you need support for other Angular version, see Breaking Changes below.

Breaking Changes

  • Version 3.x.x >= no longer supports ng 16 - 13. If you need ng 16-13 support, stick with version 2.x.x.

Description

This is a DayJs adapter to be used with the following date time picker control:

https://github.com/danielmoncada/date-time-picker

How to Use

  1. Install with npm:npm install @danielmoncada/angular-datetime-picker-dayjs-adapter --save
  2. import { NgModule } from '@angular/core';
    import { OwlDateTimeModule, OWL_DATE_TIME_FORMATS} from '@danielmoncada/angular-datetime-picker;
    import { OwlDayJsDateTimeModule } from '@danielmoncada/angular-datetime-picker-dayjs-adapter';
    
    // See the Day.js docs for the meaning of these formats:
    // https://day.js.org/docs/en/display/format
    export const MY_DAYJS_FORMATS = {
        parseInput: 'l LT',
        fullPickerInput: 'l LT',
        datePickerInput: 'l',
        timePickerInput: 'LT',
        monthYearLabel: 'MMM YYYY',
        dateA11yLabel: 'LL',
        monthYearA11yLabel: 'MMMM YYYY',
    };
    
    @NgModule({
        imports: [OwlDateTimeModule, OwlDayJsDateTimeModule],
        providers: [
            {provide: OWL_DATE_TIME_FORMATS, useValue: MY_DAYJS_FORMATS},
        ],
    })
    export class AppExampleModule {
    }

Dependencies

  • dayjs
  • @danielmoncada/angular-datetime-picker
  • tslib

Demo

License

  • License: MIT

Author

Maintained and updated by Daniel Moncada, original implementatiom by Daniel Pan

date-time-picker-dayjs-adapter's People

Contributors

danielmoncada avatar davidm42 avatar pavlikxor avatar sschneider83 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

date-time-picker-dayjs-adapter's Issues

Angular 16 - library is not compatible with Angular Ivy

node_modules/@danielmoncada/angular-datetime-picker-dayjs-adapter/lib/dayjs-adapter/dayjs-date-time.module.d.ts:6:22

This likely means that the library (@danielmoncada/angular-datetime-picker-dayjs-adapter) which declares OwlDayJsDateTimeModule is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

Update to Angular 15

@danielmoncada,

Can I please request your help in updating this package to include support for Angular 15?

In the current state installing it in an Angular 15 projects results in the below error

npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/cdk
npm ERR!   @angular/cdk@"^15.2.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/cdk@"^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0" from @danielmoncada/[email protected]
npm ERR! node_modules/@danielmoncada/angular-datetime-picker-dayjs-adapter
npm ERR!   @danielmoncada/angular-datetime-picker-dayjs-adapter@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Thanks in advance for your time.

Angular 16 import

Working with angular 16 the module cannot be imported correctly as it mentions not being compatible with ivy.

version: 2.0.1

Screenshot 2023-06-02 at 14 57 55

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.