Giter VIP home page Giter VIP logo

danielmoncada / date-time-picker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danielykpan/date-time-picker

140.0 6.0 60.0 13.94 MB

Angular Date Time Picker (Responsive Design)

Home Page: https://daniel-projects.firebaseapp.com/owlng/date-time-picker

License: MIT License

JavaScript 1.87% TypeScript 89.94% HTML 4.56% SCSS 3.63%
angular datepicker timepicker date-time-picker material-design

date-time-picker's Introduction

📅 🕐 Angular Date/Time Picker

npm npm

The current version of this package supports Angular 18

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

Breaking Changes

  • Version 18.x.x >= no longer supports ng 17. If you need ng 17 support, stick with version 17.x.x.
  • Version 17.x.x >= no longer supports ng 16 - 13. If you need ng 16-13 support, stick with version 16.x.x.
  • Version 14.x.x >= no longer supports < ng 13. If you need View Engine support, stick with version 13.x.x.
  • Version 13.1.0+ no longer supports the MomentJs time adapter natively. If you want to use the MomentJs adapter, see GitHub or npm.
  • If you need ng 8 support, please stick with: https://github.com/DanielYKPan/date-time-picker

Description

Simple Angular date time picker. Online doc is here, Online demos(StackBlitz) are here and here. This picker is responsive design, so feel free to try it in your desktops, tablets and mobile devices.

How to Use

  1. Install with npm: npm install @danielmoncada/angular-datetime-picker --save
  2. Add styles. If you are using Angular CLI, you can add this to your styles.css:
    @import "@danielmoncada/angular-datetime-picker/assets/style/picker.min.css";
    If you are not using the Angular CLI, you can include the picker.min.css via a <link> element in your index.html.
  3. Add OwlDateTimeModule and OwlNativeDateTimeModule to your @NgModule like example below
     import { NgModule } from '@angular/core';
     import { BrowserModule } from '@angular/platform-browser';
     import { MyTestApp } from './my-test-app';
     import { OwlDateTimeModule, OwlNativeDateTimeModule } from '@danielmoncada/angular-datetime-picker';
    
     @NgModule({
         imports: [
             BrowserModule,
             OwlDateTimeModule,
             OwlNativeDateTimeModule,
         ],
         declarations: [ MyTestApp ],
         bootstrap:    [ MyTestApp ]
     })
     export class MyTestAppModule {}
  4. Connecting a picker to an input and a trigger.
    <input [owlDateTime]="dt1" [owlDateTimeTrigger]="dt1" placeholder="Date Time">
    <owl-date-time #dt1></owl-date-time>
    <input [owlDateTime]="dt2" placeholder="Date Time">
    <span [owlDateTimeTrigger]="dt2"><i class="fa fa-calendar"></i></span>
    <owl-date-time #dt2></owl-date-time>
    The examples above are quite basic. The picker has much more features, and you could learn more about those from demo page.

Animation

This picker uses angular animations to improve the user experience, therefore you need to install @angular/animations and import BrowserAnimationsModule to your application.

npm install @angular/animations --save
import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';

@NgModule({
    imports: [
        BrowserModule,
        BrowserAnimationsModule,
        //...
    ],
    //...
})
export class YourAppModule { }

If you prefer to disable animation effect, use NoopAnimationsModule instead.

Choose a date implementation

The date-time picker was built to be date implementation agnostic. Developers need to make sure to provide the appropriate pieces for the picker to work with their chosen implementation. There are two pre-made modules, users need to import one of them or build your own one (learn more about this from here).

  • OwlNativeDateTimeModule - support for native JavaScript Date object
  • OwlUnixTimestampDateTimeModule - support for milliseconds since Epoch (number)
Date/Time Adapter Extensions

https://day.js.org/

  • OwlDayJsDateTimeModule - support for DayJs
    • You must install an optional adapater to use this. see here, npm

https://momentjs.com/

  • OwlMomentDateTimeModule - support for MomentJs
    • You must install an optional adapater to use this. see here, npm

Properties for owl-date-time

Name Type Required Default Description
pickerType both, calendar, timer Optional both Set the type of the dateTime picker. both: show both calendar and timer, calendar: only show calendar, timer: only show timer.
pickerMode popup, dialog Optional popup The style the picker would open as.
startView month, year, multi-year Optional month The view that the calendar should start in.
yearOnly boolean Optional false Restricts the calendar to only show the year and multi-year views for month selection.
showCalendarWeeks boolean Optional false Whether to show calendar weeks in the calendar.
multiyearOnly boolean Optional false Restricts the calendar to only show the multi-year view for year selection.
startAt T/null Optional null The moment to open the picker to initially.
endAt T/null Optional null The the default selected time for range calendar end time
firstDayOfWeek number Optional 0 Set the first day of week. Valid value is from 0 to 6. 0: Sunday - 6: Saturday
showSecondsTimer boolean Optional false When specify it to true, it would show a timer to configure the second's value
hideOtherMonths boolean Optional false Whether to hide dates in other months at the start or end of the current month
hour12Timer boolean Optional false When specify it to true, the timer would be in hour12 format mode
stepHour number Optional 1 Hours to change per step.
stepMinute number Optional 1 Minutes to change per step.
stepSecond number Optional 1 Seconds to change per step.
scrollStrategy ScrollStrategy Optional BlockScrollStrategy Define the scroll strategy when the picker is open. Learn more this from https://material.angular.io/cdk/overlay/overview#scroll-strategies.
disabled boolean Optional false When specify to true, it would disable the picker.
backdropClass string/string[] Optional null Custom class for the picker backdrop.
panelClass string/string[] Optional null Custom class for the picker overlay panel.

Events for owl-date-time

Events Parameter Description
beforePickerOpen null Callback to invoke before the picker is opened
afterPickerOpen null Callback to invoke when the picker is opened
afterPickerClosed null Callback to invoke when the picker is closed.
yearSelected T Callback to invoke when the year is selected.This doesn't imply a change on the selected date.
monthSelected T Callback to invoke when the month is selected.This doesn't imply a change on the selected date.
dateClicked T Callback when the selected data changes.
selectedChanged T Callback when the currently selected data changes.
userSelection null Callback when any date is selected.

Properties for input[owlDateTime]

Name Type Required Default Description
owlDateTime OwlDateTimeComponent<T> Require null The date time picker that this input is associated with.
owlDateTimeFilter ( date: T)=>boolean Optional null A function to filter date time.
disabled boolean Optional false When specify to true, it would disable the picker's input.
min <T> Optional null The minimum valid date time.
max <T> Optional null The maximum valid date time.
selectMode single, range, rangeFrom, rangeTo Optional single Specify the picker's select mode. single: a single value allowed, range: allow users to select a range of date-time, rangeFrom: the input would only show the 'from' value and the picker could only selects 'from' value, rangeTo: the input would only show the 'to' value and the picker could only selects 'to' value.
rangeSeparator string Optional - The character to separate the 'from' and 'to' in input value in range selectMode.

Events for input[owlDateTime]

Events Parameter Description
dateTimeChange source: OwlDateTimeInput, value: input value, input: the input element Callback to invoke when change event is fired on this <input [owlDateTime]>
dateTimeInput source: OwlDateTimeInput, value: input value, input: the input element Callback to invoke when an input event is fired on this <input [owlDateTime]>.

Properties for [owlDateTimeTrigger]

Name Type Required Default Description
owlDateTimeTrigger OwlDateTimeComponent<T> Require null The date time picker that this trigger is associated with.
disabled boolean Optional false When specify to true, it would disable the trigger.

Properties for [owlDateTimeTrigger]

Name Type Required Default Description
owlDateTimeTrigger OwlDateTimeComponent<T> Require null The date time picker that this trigger is associated with.
disabled boolean Optional false When specify to true, it would disable the trigger.

Properties for owl-date-time-inline

Name Type Required Default Description
pickerType both, calendar, timer Optional both Set the type of the dateTime picker. both: show both calendar and timer, calendar: only show calendar, timer: only show timer.
startView month, year, multi-year Optional month The view that the calendar should start in.
startAt T/null Optional null The moment to open the picker to initially.
endAt T/null Optional null The the default selected time for range calendar end time
firstDayOfWeek number Optional 0 Set the first day of week. Valid value is from 0 to 6. 0: Sunday - 6: Saturday
showSecondsTimer boolean Optional false When specify it to true, it would show a timer to configure the second's value
hideOtherMonths boolean Optional false Whether to hide dates in other months at the start or end of the current month
hour12Timer boolean Optional false When specify it to true, the timer would be in hour12 format mode
stepHour number Optional 1 Hours to change per step.
stepMinute number Optional 1 Minutes to change per step.
stepSecond number Optional 1 Seconds to change per step.
disabled boolean Optional false When specify to true, it would disable the picker.
owlDateTimeFilter ( date: T)=>boolean Optional null A function to filter date time.
min <T> Optional null The minimum valid date time.
max <T> Optional null The maximum valid date time.
selectMode single, range, rangeFrom, rangeTo Optional single Specify the picker's select mode. single: a single value allowed, range: allow users to select a range of date-time, rangeFrom: the input would only show the 'from' value and the picker could only selects 'from' value, rangeTo: the input would only show the 'to' value and the picker could only selects 'to' value.

Localization and DateTime Format

Localization for different languages and formats is defined by OWL_DATE_TIME_LOCALE and OWL_DATE_TIME_FORMATS. You could learn more about this from here.

Dependencies

none

Demo

  • Online doc is here
  • Online demos (StackBlitz) are here and here

License

  • License: MIT

Author

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

date-time-picker's People

Contributors

anderstornkvist avatar bastienledon avatar burner avatar danielmoncada avatar danielykpan avatar desmond1191 avatar fabianrios avatar ivanvs avatar joostk avatar julians1987 avatar keithgillette avatar komu avatar krusche avatar leeviviertola avatar lonli-lokli avatar mdudek avatar msqaddura avatar nadim500 avatar netwin avatar pasevin avatar pavlikxor avatar samuelmarks avatar sedran avatar theskabeater avatar topaxi avatar vaggal avatar

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

date-time-picker's Issues

Using dayjs for date-time-adapter

Currently i created a date-time-adapter with dayjs and i want to remove moment. I'm not using moment-adapter but while building the project it gives me error.

image

Can you make moment-adapter optional package like material' date-picker did.

Problem with ngModel and owl-date-time-inline

Hello,

I have one problem when I put ngModel . I have this in my HTML:
<owl-date-time-inline [startAt]="todayDate"
pickerType="calendar"
[(ngModel)]="selectedMoment"
name="calender"
(ngModelChange)="dateChanged($event)"
[ngModelOptions]="{standalone: true}"
effectBoxShadow="off"
effectBackground="off">

And I have this error:
ERROR NullInjectorError: R3InjectorError(AppModule)[NgForm -> NgForm -> NgForm]:
NullInjectorError: No provider for NgForm!
at NullInjector.get (https://localhost:44305/vendor.js:39899:27)
at R3Injector.get (https://localhost:44305/vendor.js:53893:33)
at R3Injector.get (https://localhost:44305/vendor.js:53893:33)
at R3Injector.get (https://localhost:44305/vendor.js:53893:33)
at NgModuleRef$1.get (https://localhost:44305/vendor.js:71194:33)
at Object.get (https://localhost:44305/vendor.js:68928:35)
at getOrCreateInjectable (https://localhost:44305/vendor.js:43701:39)
at ɵɵdirectiveInject (https://localhost:44305/vendor.js:57708:12)
at ɵɵinject (https://localhost:44305/vendor.js:39764:57)
at injectArgs (https://localhost:44305/vendor.js:39881:23)
defaultErrorLogger @ core.js:6228
core.js:6228 ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(AppModule)[NgForm -> NgForm -> NgForm]:
NullInjectorError: No provider for NgForm!
NullInjectorError: R3InjectorError(AppModule)[NgForm -> NgForm -> NgForm]:
NullInjectorError: No provider for NgForm!
at NullInjector.get (core.js:1085)
at R3Injector.get (core.js:16955)
at R3Injector.get (core.js:16955)
at R3Injector.get (core.js:16955)
at NgModuleRef$1.get (core.js:36329)
at Object.get (core.js:33972)
at getOrCreateInjectable (core.js:5848)
at ɵɵdirectiveInject (core.js:21103)
at ɵɵinject (core.js:950)
at injectArgs (core.js:1067)
at resolvePromise (zone-evergreen.js:798)
at resolvePromise (zone-evergreen.js:750)
at zone-evergreen.js:860
at ZoneDelegate.invokeTask (zone-evergreen.js:399)
at Object.onInvokeTask (core.js:41632)
at ZoneDelegate.invokeTask (zone-evergreen.js:398)
at Zone.runTask (zone-evergreen.js:167)
at drainMicroTaskQueue (zone-evergreen.js:569)
at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:484)
at invokeTask (zone-evergreen.js:1621)

Thank you for your attention,
Filipa

Cant edit Hour and minute in input field

I've implemented an owl-date-time picker but I've issue while entering hours and seconds manually.
I always need to click on up and down arrows.

<input class="form-control" placeholder="Trigger Execution Start Time" id="fromTime" name="fromTime"
                  [(ngModel)]="fromTime" [owlDateTimeTrigger]="dt1" [owlDateTime]="dt1"
                  style="width: 370px;" #triggerFromDateRef="ngModel" required>
                <div class="left" style="width: max-content;">
                  <span *ngIf="triggerFromDateRef.invalid && (triggerFromDateRef.dirty || triggerFromDateRef.touched)">
                    <span *ngIf="triggerFromDateRef.errors.required" class="error">
                      Please Enter Trigger Start Date
                    </span>
                  </span>
                </div>
                <owl-date-time #dt1 [hour12Timer]="true"></owl-date-time>

Peer dependencies not compatible with @angular/material 10.1.1

When trying to update @angular/material dependency from version 9.1 to 10.0 (released a month ago), I've got an error because of angular-datetime-picker's peerDependencies. Here's the message:

Package "@danielmoncada/angular-datetime-picker" has an incompatible peer dependency to "@angular/cdk" (requires "^8.0.0 || ^9.0.0", would install "10.1.1").

I did the update anyway by using the --force flag, and the components seem to work fine.

If you support Angular 10 (and it seems you do given the description [9+]), can you change the peerDependencies to include @angular/material in ^10.0.0?

Thanks in advance.

Error when trying to fire up in a dialog, angular 10.0.5

app.js:288471 TypeError: Class constructor BasePortalOutlet cannot be invoked without 'new'
at new OwlDialogContainerComponent (app.js:93838)
at createClass (app.js:68195)
at createDirectiveInstance (app.js:68068)
at createViewNodes (app.js:73478)
at createRootView (app.js:73381)
at callWithDebugContext (app.js:74272)
at Object.debugCreateRootView [as createRootView] (app.js:73852)
at ComponentFactory_.create (app.js:67682)
at ComponentFactoryBoundToModule.create (app.js:66164)
at ViewContainerRef_.createComponent (app.js:67771)

Issue when time picker value change

Hello,

We are using date-time-picker in our application. We have a problem that when we are facing a issue that when we are changing time picker value and click on set button with in 500ms the value is not reflected. So in the datepicker text field value of minutes or hour which we have set remains as it is and the new value is not reflected.

Angular9 Cannot read property formatString

Hey Daniel,
first of thanks for porting this to Angular9! Big thumbs up.
Almost Everything seems to be working fine,
however when I load up a form with an already existing date-value,
I get the following error:

TypeError: Cannot read property 'formatString' of undefined
at OwlDateTimeInputDirective.formatNativeInputValue (danielmoncada-angular-datetime-picker.js:3371)
at OwlDateTimeInputDirective.set value [as value] (danielmoncada-angular-datetime-picker.js:3216)

We just imported the

  • OwlDateTimeModule,
  • OwlNativeDateTimeModule
    no custom formats etc are existing or being created.

However we have the default LOCALE_ID of 'de' set in angular.

Maybe you can help.

"required" attribute with compilation error on angular 9 with fullTemplateTypeCheck option

Hi,

When compiling an html template with
<input matInput [owlDateTime]="birthDatePicker" name="birthDate" [(ngModel)]="client.birthDate" [max]="maxBirthDate" required>

I get the following compilation error:
error TS2322: Type 'string' is not assignable to type 'boolean'.
Shouldn't this way of setting required be supported? I believe in this case type for required property should be boolean | ''.

Thanks in advance and best regards
POFerro

Compilation error message after updating from Angular 9.1.3 to 9.1.5

ERROR in node_modules/@danielmoncada/angular-datetime-picker/danielmoncada-angular-datetime-picker.d.ts:17:42 - error TS1149: File name 'node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/numberedFixLen.pipe.d.ts' differs from already included file name 'node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/numberedfixlen.pipe.d.ts' only in casing.

17 export { NumberFixedLenPipe as ɵu } from './lib/date-time/numberedFixLen.pipe';

Application runs fine, but I thought this might be of your interest.

Looking at source code:
"lib/date-time/date-time.module.d.ts:16"
contains "import * as ɵngcc12 from './numberedfixlen.pipe';"

"danielmoncada-angular-datetime-picker.d.ts:17"
contains export { NumberFixedLenPipe as ɵu } from './lib/date-time/numberedFixLen.pipe';

New version of ngcc is adding "numberedfixlen.pipe" to date-time.module.d.ts old one was adding "numberedFixLen.pipe"

Display UTC

How can we display UTC format instead of the GMT time?

library will not build without Momentjs

I would like to build my app without momentjs to reduce bundle size but build fails

ERROR in node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/adapter/moment-adapter/moment-date-time-adapter.class.d.ts:5:24 - error TS2307: Cannot find module 'moment' or its corresponding type declarations.

5 import { Moment } from 'moment';

Even momentjs guys/gals are admitting that there are nicer alternatives

Another common argument against using Moment in modern applications is its size. Moment doesn't work well with modern "tree shaking" algorithms, so it tends to increase the size of web application bundles. If one needs internationalization or time zone support, Moment can get quite large. Modern web browsers (and Node.js) expose internationalization and time zone support via the Intl object, codified as ECMA-402. Libraries like Luxon (and others) take advantage of this, reducing or removing the need to ship your own data files.
Recently, Chrome Dev Tools started showing recommendations for replacing Moment for the size alone. We generally support this move.

See https://momentjs.com/docs/#/-project-status/

would it be possible to restructure this library so it will not be a required dependency?

Error: Target entry-point has missing dependencies

Hey I tried to use this package with the native Adapter (instead of the moment adapter) but with Angular 9 (the ivy renderer) I get this error when trying to ng serve my project:

ERROR in The target entry-point "@danielmoncada/angular-datetime-picker" has missing dependencies:
 - moment

So I guess even though I don't import the moment adapter your package still suggests that it depends on momentjs?

My implementation:

import { NgModule } from '@angular/core';
import { OwlDateTimeModule, OwlNativeDateTimeModule } from '@danielmoncada/angular-datetime-picker';

import { SharedModule } from '../../shared.module';
import { DatepickerComponent } from './datepicker.component';

@NgModule({
  declarations: [
    DatepickerComponent
  ],
  imports: [
    SharedModule,
    OwlDateTimeModule,
    OwlNativeDateTimeModule,
  ],
  exports: [
    DatepickerComponent
  ]
})
export class DatepickerModule { }

In the template:

<input [owlDateTime]="datepicker">
<owl-date-time #datepicker></owl-date-time>

Error when building with AOT in Angular 8.2

Hi, I'm getting the following error when building my application with AOT:

ERROR in Directive ɵq in node_modules/@danielmoncada/angular-datetime-picker/danielmoncada-angular-datetime-picker.d.ts has no selector, please add it!
Cannot determine the module for class ɵq in node_modules/@danielmoncada/angular-datetime-picker/danielmoncada-angular-datetime-picker.d.ts! Add ɵq to the NgModule to fix it.

I'm using the following package versions:

Any idea how to fix this?

How to disable validation while inputing time and minute

Hi,
I'm currently using the version 9.4.2, and the issue I'm facing is that when we're retrying to input an hour and minutes over the time fields, someone there is a validation running making it impossible to set time like 12, 15, as for the first number entered, it's immediately led by a 0.

Peek 2020-07-04 18-48

This is really annoying as we don't necessarily need to use the arrows

Issue When mulitple date picker in same screen

Hello,
We are using date picker in our application. We are facing problem when our screen height is small

Our normal screen with two date picker is
Capture1

Here when we click on left side date picker date picker opens as shown below
Capture2

But when we click on right side date picker, the date picker opens down side and date picker's bottom part is getting cut

Capture3

Can you help me with the issue.

Pophover close when selecting date inside the pophover

Hello,
We are using ngbPopover as pop-box.
And inside pop-box we put Date picker
On click of date picker open date selection pop box then selection of date main popbox is close.

Here in popHover we have added properties [autoClose]="'outside'"
Issue : On selection of date in date picker not close main popover box.

Capture4

Versions of ng-bootstrap ,Bootstrap and Angular Date Time Picker:
"@danielmoncada/angular-datetime-picker": "^9.3.0"
"@ng-bootstrap/ng-bootstrap": "^6.1.0"
"bootstrap": "^4.4.1"

Error on Angular 9

Hi,
i see your repo on issue of ng-date-time-picker.
I try to use it in my Angular 9 project but I recive an error when I click on input field to open popup calendar.

The error that I recive is :
ERROR Error: No component factory found for OwlDateTimeContainerComponent. Did you add it to @NgModule.entryComponents

I reproduce the issue on this link: HERE

Can you fix it?
Thanks

main property on package.json should be es2015

Angular 10 is not compatible with esm5, fesm5 bundles.

This library has this as the main property in its package.json, and it's causing issues in an angular 10 build. in the meantime I have to use an alias to force the es2015 bundle instead

"main": "bundles/danielmoncada-angular-datetime-picker.umd.js",

Should have this value instead:
fesm2015/danielmoncada-angular-datetime-picker.js

Setting locale does not work

Whenever i set the locale using e.g.
{provide: OWL_DATE_TIME_LOCALE, useValue: 'nl'}

I end up with the runtime error as follows:
zone.js:192 Uncaught TypeError: Cannot read property 'focus' of null at SafeSubscriber._next (danielmoncada-angular-datetime-picker.js:706)

How to handle event when I select date in date range?

I want to handle date change event so that when I select start date and end date as same date (select 24 hours of the day ) then I should be able to set start time as "1 am" and end time as "11 pm" in time picker.

MY_MOMENT_FORMATS: parseInput is not working

I am setting following formats but parseInput is not working for me. I expect that value that I will receive in my form control will be as per format provided in parseInt but it always set value in a different format.

Actually, I want to have different date formats for display & actual value that will be passed to form control.

export const MY_MOMENT_FORMATS = {
    parseInput: 'YYYY-MM-DD HH:mm:ss',
    fullPickerInput: 'MMM DD, YYYY hh:mm A',
    datePickerInput: 'MMM DD, YYYY',
    timePickerInput: 'hh:mm:ss A',
    monthYearLabel: 'MMM YYYY',
    dateA11yLabel: 'LL',
    monthYearA11yLabel: 'MMMM YYYY',
}

Changing locale at runtime does not change the locale of datepicker

Per docs I can see that it is possible to change the locale of the datepicker at runtime:
constructor(dateTimeAdapter: DateTimeAdapter<any>) { dateAdapter.setLocale('ja-JP'); // change locale to Japanese }

I'm trying to use the datepicker in cooperation with ngx-translate.
I have set up a language change subscription which would then set the locale of the selected language:

this.langSub = this._T.onLangChange.subscribe((lang: LangChangeEvent) => { this.dateTimeAdapter.setLocale(lang.lang); });

After the setLocale I can see, that the locale of dateTimeAdapter instance is changed, but the owlDateTimeLocale is still unchanged and the datepicker is shown in the locale of owlDateTimeLocale

DateTimeAdapter instance after changing the locale to 'et'
image

Styling days inside the calendar

Hi! I would like to mark working days and weekends with color in the calendar. To do this, you just need to be able to set a class for each of the days in the calendar.

/projects/picker/src/lib/date-time/calendar-month-view.component.ts

    /**
     * Creates CalendarCell for days.
     */
    private createDateCell(date: T, daysDiff: number): CalendarCell {
        // total days of the month
        const daysInMonth = this.dateTimeAdapter.getNumDaysInMonth(
            this.pickerMoment
        );
        const dateNum = this.dateTimeAdapter.getDate(date);
        // const dateName = this.dateNames[dateNum - 1];
        const dateName = dateNum.toString();
        const ariaLabel = this.dateTimeAdapter.format(
            date,
            this.dateTimeFormats.dateA11yLabel
        );

        // check if the date if selectable
        const enabled = this.isDateEnabled(date);

        // check if date is not in current month
        const dayValue = daysDiff + 1;
        const out = dayValue < 1 || dayValue > daysInMonth;
        const cellClass = 'owl-dt-day-' + this.dateTimeAdapter.getDay(date);

        return new CalendarCell(
            dayValue,
            dateName,
            ariaLabel,
            enabled,
            out,
            cellClass
        );
    }

if you add the ability to specify additional classes to this code, this would solve my problem.

Errors in node_modules date-time-moment

After doing npm install ng-pick-datetime-moment moment --save;

I get the following errors

ERROR in ./node_modules/ng-pick-datetime-moment/ivy_ngcc/moment-adapter/moment-date-time-adapter.class.js 231:30-55
"export 'ɵɵdefineInjectable' (imported as 'ɵngcc0') was not found in '@angular/core'
ERROR in ./node_modules/ng-pick-datetime-moment/ivy_ngcc/moment-adapter/moment-date-time.module.js 16:28-51
"export 'ɵɵdefineInjector' (imported as 'ɵngcc0') was not found in '@angular/core'
ERROR in ./node_modules/ng-pick-datetime-moment/ivy_ngcc/moment-adapter/moment-date-time.module.js 43:31-54
"export 'ɵɵdefineInjector' (imported as 'ɵngcc0') was not found in '@angular/core'
ERROR in ./node_modules/ng-pick-datetime-moment/ivy_ngcc/moment-adapter/moment-date-time.module.js 15:28-51
"export 'ɵɵdefineNgModule' (imported as 'ɵngcc0') was not found in '@angular/core'
ERROR in ./node_modules/ng-pick-datetime-moment/ivy_ngcc/moment-adapter/moment-date-time.module.js 42:31-54
"export 'ɵɵdefineNgModule' (imported as 'ɵngcc0') was not found in '@angular/core'
ERROR in ./node_modules/ng-pick-datetime-moment/ivy_ngcc/moment-adapter/moment-date-time-adapter.class.js 230:113-128
"export 'ɵɵinject' (imported as 'ɵngcc0') was not found in '@angular/core'
ERROR in ./node_modules/ng-pick-datetime-moment/ivy_ngcc/moment-adapter/moment-date-time-adapter.class.js 230:155-170
"export 'ɵɵinject' (imported as 'ɵngcc0') was not found in '@angular/core'
ERROR in ./node_modules/ng-pick-datetime-moment/ivy_ngcc/moment-adapter/moment-date-time.module.js 44:66-91
"export 'ɵɵsetNgModuleScope' (imported as 'ɵngcc0') was not found in '@angular/core'

Missing dependencies

Hey guys,

Happy to see someone is going to maintain the library 😸

I just wanted to know why is moment required as a library?

If I don't have install moment I get the following error:

ERROR in The target entry-point "@danielmoncada/angular-datetime-picker" has missing dependencies:
 - moment

Can't install. Failed to compile.

Hello.
When I tried to install this module and use it I catch the

ERROR in ERROR in node_modules/@angular/cdk/a11y/focus-trap/focus-trap.d.ts(29,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/focus-trap/focus-trap.d.ts(30,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/focus-trap/focus-trap.d.ts(128,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/focus-trap/focus-trap.d.ts(129,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/focus-trap/focus-trap.d.ts(134,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/focus-trap/focus-trap.d.ts(135,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/key-manager/list-key-manager.d.ts(96,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/key-manager/list-key-manager.d.ts(98,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/live-announcer/live-announcer.d.ts(69,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/live-announcer/live-announcer.d.ts(70,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/bidi/dir.d.ts(26,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/bidi/dir.d.ts(27,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/bidi/dir.d.ts(29,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/collections/selection-model.d.ts(24,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/observers/observe-content.d.ts(62,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/observers/observe-content.d.ts(63,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/observers/observe-content.d.ts(66,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/observers/observe-content.d.ts(67,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(60,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(61,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(63,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(64,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(86,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(87,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(89,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(90,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(92,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(93,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(95,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(96,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(98,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(99,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(112,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-directives.d.ts(114,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-ref.d.ts(55,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-ref.d.ts(57,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/overlay-ref.d.ts(63,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/position/connected-position-strategy.d.ts(36,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/position/connected-position-strategy.d.ts(40,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/position/connected-position-strategy.d.ts(43,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/overlay/position/flexible-connected-position-strategy.d.ts(91,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/portal/portal-directives.d.ts(49,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/portal/portal-directives.d.ts(50,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/portal/portal-directives.d.ts(54,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/portal/portal.d.ts(24,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/portal/portal.d.ts(63,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/scrolling/fixed-size-virtual-scroll.d.ts(75,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/scrolling/fixed-size-virtual-scroll.d.ts(76,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/scrolling/fixed-size-virtual-scroll.d.ts(82,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/scrolling/fixed-size-virtual-scroll.d.ts(83,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/scrolling/fixed-size-virtual-scroll.d.ts(88,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/scrolling/fixed-size-virtual-scroll.d.ts(89,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/scrolling/virtual-for-of.d.ts(49,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/scrolling/virtual-for-of.d.ts(50,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/scrolling/virtual-for-of.d.ts(56,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/scrolling/virtual-for-of.d.ts(57,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/scrolling/virtual-for-of.d.ts(60,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/scrolling/virtual-scroll-viewport.d.ts(27,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/scrolling/virtual-scroll-viewport.d.ts(28,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/adapter/date-time-adapter.class.d.ts(20,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/adapter/moment-adapter/moment-date-time-adapter.class.d.ts(5,24): error TS2307: Cannot find module 'moment'.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/adapter/moment-adapter/moment-date-time-adapter.class.d.ts(63,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-body.component.d.ts(50,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-body.component.d.ts(51,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-body.component.d.ts(52,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(23,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(24,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(29,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(30,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(33,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(34,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(36,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(37,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(39,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(40,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(45,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(46,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(49,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(50,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(53,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(54,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(56,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(62,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(63,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(64,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(65,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-month-view.component.d.ts(92,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(19,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(20,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(23,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(24,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(26,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(27,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(29,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(30,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(35,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(36,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(39,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(40,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(43,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(44,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(46,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(48,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(50,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(52,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(53,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(54,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(55,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(56,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(57,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(72,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-multi-year-view.component.d.ts(73,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(17,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(18,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(21,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(22,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(24,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(25,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(27,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(28,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(33,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(34,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(37,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(38,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(41,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(42,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(45,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(46,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(47,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(48,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar-year-view.component.d.ts(71,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(16,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(17,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(18,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(19,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(20,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(21,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(22,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(23,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(24,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(25,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(26,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(27,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(28,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(29,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(30,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(31,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(32,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(33,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(34,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(35,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/calendar.component.d.ts(39,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(23,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(24,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(26,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(27,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(29,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(30,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(33,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(34,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(36,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(37,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(40,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(41,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(44,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(45,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(47,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(48,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(50,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(51,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(63,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(64,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(66,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(67,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(68,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(69,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(70,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(71,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-inline.component.d.ts(72,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(25,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(30,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(32,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(38,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(39,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(40,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(41,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(42,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(46,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(50,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(54,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(58,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(64,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(65,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(66,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(67,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(68,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(69,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(70,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(71,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-container.component.d.ts(72,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(20,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(24,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(26,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(29,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(30,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(33,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(34,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(37,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(38,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(43,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(44,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(50,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(51,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(53,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(54,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(63,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(64,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(65,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(93,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(94,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(95,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(96,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-input.directive.d.ts(97,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-trigger.directive.d.ts(10,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-trigger.directive.d.ts(11,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker-trigger.directive.d.ts(12,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(36,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(37,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(45,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(46,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(51,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(52,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(55,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(56,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(59,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(60,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(103,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(105,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(106,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(108,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(109,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(111,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(113,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(114,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(115,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(116,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time-picker.component.d.ts(117,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(17,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(18,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(23,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(24,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(33,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(34,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(39,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(40,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(45,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(46,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(51,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(52,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(57,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(58,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(60,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(61,18): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(62,18): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(63,18): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(64,18): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(65,18): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(66,18): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(67,18): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(68,18): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(69,18): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(70,18): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(71,18): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(72,18): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(78,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/date-time.class.d.ts(83,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer-box.component.d.ts(25,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer-box.component.d.ts(26,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(15,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(16,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(19,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(20,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(23,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(24,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(46,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(52,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(53,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(54,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(55,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(56,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(57,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(58,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(59,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(60,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(61,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(63,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/date-time/timer.component.d.ts(64,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/dialog/dialog-container.component.d.ts(23,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/dialog/dialog-container.component.d.ts(27,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/dialog/dialog-container.component.d.ts(28,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/dialog/dialog-container.component.d.ts(29,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/dialog/dialog-container.component.d.ts(30,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/dialog/dialog-container.component.d.ts(31,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/dialog/dialog-container.component.d.ts(32,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/dialog/dialog-container.component.d.ts(33,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/dialog/dialog.service.d.ts(39,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/dialog/dialog.service.d.ts(41,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@danielmoncada/angular-datetime-picker/lib/dialog/dialog.service.d.ts(42,9): error TS1086: An accessor cannot be declared in an ambient context.

What do I need to do?

Localizing labels and messages is not working

Hi and thx for the library update =)

Here my code :

import { OwlDateTimeModule, OwlMomentDateTimeModule, OWL_DATE_TIME_FORMATS, OwlDateTimeIntl } from '@danielmoncada/angular-datetime-picker';
...
export class DefaultIntl extends OwlDateTimeIntl {
  upSecondLabel = 'Add a second';
  downSecondLabel = 'Minus a second';
  upMinuteLabel = 'Add a minute';
  downMinuteLabel = 'Minus a minute';
  upHourLabel = 'Add a hour';
  downHourLabel = 'Minus a hour';
  prevMonthLabel = 'Previous month';
  nextMonthLabel = 'Next month';
  prevYearLabel = 'Previous year';
  nextYearLabel = 'Next year';
  prevMultiYearLabel = 'Previous 21 years';
  nextMultiYearLabel = 'Next 21 years';
  switchToMonthViewLabel = 'Change to month view';
  switchToMultiYearViewLabel = 'Choose month and year';
  cancelBtnLabel = 'Annuler';
  setBtnLabel = 'Valider';
  rangeFromLabel = 'From';
  rangeToLabel = 'To';
  hour12AMLabel = 'AM';
  hour12PMLabel = 'PM';
}
...
  providers: [
        { provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE] },
        { provide: LOCALE_ID, useValue: 'fr' },
        { provide: MAT_DATE_FORMATS, useValue: MY_FORMATS },
        { provide: MAT_DATE_LOCALE, useValue: 'fr-FR' },
        { provide: OWL_DATE_TIME_FORMATS, useValue: DATETIME_FORMATS },
        { provide: OwlDateTimeIntl, useClass: DefaultIntl }
      ]

I've customized setBtnLabel and cancelBtnLabel, but labels are not replaced and I still see "Cancel" and "Set"

I use @danielmoncada/[email protected], @angular/core@~9.1.7 and build with Ivy.

I've tried in the demo stackblitz and this is working but those demo use an old version of the lib.
I tried to make my own stackblitz with updated versions but it seems it doesn't work with your lib : https://stackblitz.com/edit/angular-ivy-h2trhq?file=src%2Fapp%2Fapp.component.html

What should I do?
Thx

build with production mode fails

when building with production mode giving issues, while building without production is running fine

  • Command Used: ng build --prod

Enviornment Versions:
node v12.16.2
npm v6.14.4

Dependencies Version:
angular/core": "^8.2.14",
angular/material": "^8.2.3",
angular/material-moment-adapter": "^9.2.0",
moment": "^2.27.0",
**ng-pick-datetime": "^7.0.0",
ngx-bootstrap": "^4.2.0",

---tried both version 1.0.7 ,1.0.8 one by one for testing --------
ng-pick-datetime-moment": "^1.0.8",**
ng-pick-datetime-moment": "^1.0.7",**

----------------import statements used in my module----------------------------------
import { DateTimeAdapter, OWL_DATE_TIME_LOCALE, OwlDateTimeIntl } from 'ng-pick-datetime';
import { MomentDateTimeAdapter } from 'ng-pick-datetime-moment';

Tried importing OwlMomentDateTimeModule by both ways ,but both not working in my module--------
// import { OwlMomentDateTimeModule } from 'ng-pick-datetime-moment';
import { OwlMomentDateTimeModule } from 'ng-pick-datetime/date-time/adapter/moment-adapter/moment-date-
time.module';

import { OwlDateTimeModule, OwlNativeDateTimeModule, OWL_DATE_TIME_FORMATS } from 'ng-pick-datetime';

ERROR in ../ng-pick-datetime-moment/moment-adapter/moment-date-time-adapter.class.ts(46,2): Error during template compile of 'MomentDateTimeAdapter'
Function calls are not supported in decorators but 'ɵmakeDecorator' was called in 'Injectable'
'Injectable' calls 'ɵmakeDecorator'.

Cannot run my app after installing date-time-picker

I tried the installation steps. But, it doesn't compile at all. I just installed it with npm install @danielmoncada/angular-datetime-picker --save. I didn't even add it in AppModule yet. Not sure why this happens. Without installing this package, my app is running fine. I am getting this error.

AggregateException: One or more errors occurred. (One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. **The error output was: Compiling @danielmoncada/angular-datetime-picker : module as esm5**

I tried npm audit fix, npm fund. But, nothing works. I am using Angular 9.1. Any idea about this? Thanks in advance.

Using Angular Material v10

We updated our project to Angular v10 and upgrading Angular Material v10 didn't work without using --force:

$ ng update @angular/material
Using package manager: 'npm'
Collecting installed dependencies...
Found 40 dependencies.
Fetching dependency metadata from registry...
                  Package "@danielmoncada/angular-datetime-picker" has an incompatible peer dependency to "@angular/cdk" (requires "^8.0.0 || ^9.0.0", would install "10.0.1").
✖ Migration failed: Incompatible peer dependencies found.
Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together.
You can use the '--force' option to ignore incompatible peer dependencies and instead address these warnings later.
  See "/private/var/folders/9w/p0dbd93j26qcc_5z4h222_c00000gn/T/ng-kqHLjM/angular-errors.log" for further details.

The update with --force worked without any issues.

Date Formatting Issues

The question below was originally posted on DanielYKPan#687, but I'm guessing that's now dead. Some comments in the project, led me here. Any help would be greatly appreciated.

We are on Angular version 6.

I've been stuck on the following issues for a while now and not sure what else to try. I need a the date time format to be in yyyy-MM-dd HH:mm. I have followed the instructions in https://danielykpan.github.io/date-time-picker/#locale-formats and I have added the imports, MY_NATIVE_FORMATS and the providers to to my app.module.ts file as follows:

import { DateTimeAdapter, OwlDateTimeModule, OwlNativeDateTimeModule, OWL_DATE_TIME_LOCALE, OWL_DATE_TIME_FORMATS } from 'ng-pick-datetime';

export const MY_NATIVE_FORMATS = {

fullPickerInput: 'yyyy-MM-dd HH:mm'

}

imports: [
OwlDateTimeModule,
OwlNativeDateTimeModule
],
providers: [
{provide: OWL_DATE_TIME_LOCALE, useValue: 'en-GB'},
{provide: OWL_DATE_TIME_FORMATS, useValue: MY_NATIVE_FORMATS.fullPickerInput}
]

With the above in place, the problem I have, is that all datetimepickers display the date only with format dd/MM/YYYY with no time component at all. So for example Monday 16th March 2020 11:20 will simply display as 16/03/2020 instead of 2020-03-16 11:20.

The second issue I have is that when I use the date picker, the format of the date is different to when I type a date into the field directly, which seems to only accept dates in the format of mm/dd/yyyy.

The third issue, as advised by DanielYKPan, when I try to create a custom-date-picker.ts and extend DateTimeAdapter, I have to implement many abstract members defined in DateTimeAdapter.

Any help is appreciated.

Thanks

Time-picker problem inside bootstrap modal

Hi, I am having an issue with time-picker when I am trying to implement it in a bootstrap modal.
Like said in that issue
DanielYKPan#372

I'm overwritten the css z-index for class cdk-overlay-container, but inputs for minutes and hours are not accessible, the user can only click the arrows.

Maybe anyone know's fix for that problem?

Moment support

Hi Daniel thank you for reactivate the project.
I've been using ng-pick-datetime with moment, so I had to install ng-pick-datetime. At the moment the library is throwing errors because they expect to import things from the old library.

There are a way to fix this and continue using moment?

Problem entering hours and minute manually

When I try to enter hours or minutes manually it automatically add a 0. I have to carefully select the number to replace it, so I have to do this twice for each number if I want to enter a number bigger than 9.

I was thinking maybe there is an incompatibility with something? I was able to unblock it by passing the maxlength of the input at 3 in the console if this informations can help.

Thanks in advance

Locales Are Not Working As Before

I changed from the main repo for this one with a working translatable date time picker. Right now, translations seem to not be working. Please fix this. :)

global.error-handler.ts:13 Error: Missing locale data for the locale "pt-BR".
    at findLocaleData (core.js:23261)
    at getLocaleFirstDayOfWeek (common.js:1186)
    at new OwlMonthViewComponent (danielmoncada-angular-datetime-picker.js:4693)
    at NodeInjectorFactory.OwlMonthViewComponent_Factory [as factory] (danielmoncada-angular-datetime-picker.js:5197)
    at getNodeInjectable (core.js:3900)
    at instantiateAllDirectives (core.js:8267)
    at createDirectivesInstances (core.js:7659)
    at Module.ɵɵelementStart (core.js:14360)
    at OwlCalendarComponent_owl_date_time_month_view_18_Template (danielmoncada-angular-datetime-picker.js:26)
    at executeTemplate (core.js:7632)
...

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.