DanielYKPan / date-time-picker

Angular Date Time Picker (Responsive Design)
https://daniel-projects.firebaseapp.com/owlng/date-time-picker
MIT License
562 stars 357 forks source link

Angular 8 support #604

Open nitzanb-medopad opened 5 years ago

nitzanb-medopad commented 5 years ago

no support yet

justjcool commented 5 years ago

also, error in prod build

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'.

dvkudashev commented 5 years ago

Enable Angular Ivy: WARNING in Entry point 'ng-pick-datetime-moment' contains deep imports into 'moment/moment'. This is probably not a problem, but may cause the compilation of entry points to be out of order.

ERROR in Expected array when reading property declarations

shahmhussain commented 5 years ago

Enable Angular Ivy: WARNING in Entry point 'ng-pick-datetime-moment' contains deep imports into 'moment/moment'. This is probably not a problem, but may cause the compilation of entry points to be out of order.

ERROR in Expected array when reading property declarations

MomentDateTimeAdapter in ng-pickdatetime-moment seems to be depreciated however i have found MomentDateTimeAdapter within the source code of the ng-pick-datetime.

MomentDateTimeAdapter just needs to be added to the index.js by the library owner, after this the error above should go away.

dvkudashev commented 5 years ago

MomentDateTimeAdapter in ng-pickdatetime-moment seems to be depreciated however i have found MomentDateTimeAdapter within the source code of the ng-pick-datetime.

MomentDateTimeAdapter just needs to be added to the index.js by the library owner, after this the error above should go away.

There is a line in the index.js file   export * from './moment-adapter/moment-date-time-adapter.class';

shahmhussain commented 5 years ago

Mind posting a link to where you see this?

MomentDateTimeAdapter in ng-pickdatetime-moment seems to be depreciated however i have found MomentDateTimeAdapter within the source code of the ng-pick-datetime.

MomentDateTimeAdapter just needs to be added to the index.js by the library owner, after this the error above should go away.

There is a line in the index.js file   export * from './moment-adapter/moment-date-time-adapter.class';

dvkudashev commented 5 years ago

Mind posting a link to where you see this?

MomentDateTimeAdapter in ng-pickdatetime-moment seems to be depreciated however i have found MomentDateTimeAdapter within the source code of the ng-pick-datetime.

MomentDateTimeAdapter just needs to be added to the index.js by the library owner, after this the error above should go away.

There is a line in the index.js file   export * from './moment-adapter/moment-date-time-adapter.class';

Understood, the error is not in theindex.js file, but in the file moment-date-time-adapter.class.ts, @DanielYKPan need to import {Moment} from 'moment/moment'; replace with import {Moment} from 'moment';

for Angular 8 only use ng-pick-datetime-moment version 1.0.7

and if you are using the "ngx-bootstrap" library, you need to install version 5.1.0

hijamoya commented 5 years ago

Need this, too.

dvkudashev commented 5 years ago

Enable Ivy Angular 8.1.0: ERROR in There is no typings path for OwlDateTimeTriggerDirective in .../node_modules/ng-pick-datetime/date-time/date-time-picker-trigger.directive.js. We need to add an export for this class to a .d.ts typings file because Angular compiler needs to be able to reference this class in compiled code, such as templates. The simplest fix for this is to ensure that this class is exported from the package's entry-point.

qwe12e commented 5 years ago

Any update on support for angular 8?

if i didn't use like you said

for Angular 8 only use ng-pick-datetime-moment version 1.0.7 and if you are using the "ngx-bootstrap" library, you need to install version 5.1.0

I get this error ERROR in ../ng-pick-datetime-moment/moment-adapter/moment-date-time.module.ts(22,2): Error during template compile of 'OwlMomentDateTimeModule' Function calls are not supported in decorators but 'ɵmakeDecorator' was called in 'NgModule' 'NgModule' calls 'ɵmakeDecorator'.

when i build with what you said it seems to working but i get this error Cannot use 'in' operator to search for 'intlTelInputUtils' in undefined

ce-page commented 5 years ago

Managed to fix this by importing the module directly.

import { OwlMomentDateTimeModule } from 'ng-pick-datetime/date-time/adapter/moment-adapter/moment-date-time.module';
qwe12e commented 5 years ago

still not working any idea? i try like this:

import {OwlDateTimeModule} from 'ng-pick-datetime';
or
import {OwlDateTimeModule} from 'ng-pick-datetime/date-time';

import {OwlMomentDateTimeModule} from 'ng-pick-datetime/date-time/adapter/moment-adapter/moment-date-time.module';
qwe12e commented 5 years ago

in mobile i'm using dialog version of owlpicker and it's broken in angular 8

image

BlindDespair commented 5 years ago

Will we get angular 8 support, please? I am also having error:


We need to add an export for this class to a .d.ts typings file because Angular compiler needs to be able to reference this class in compiled code, such as templates.
The simplest fix for this is to ensure that this class is exported from the package's entry-point.```
justjcool commented 5 years ago

I don't know what's wrong with DanielYKPan he is not active on Github from last 9 months, I think will not get any new update until new maintainer is assigned.

Anzil-Aufait commented 5 years ago

Managed to fix this by importing the module directly.

import { OwlMomentDateTimeModule } from 'ng-pick-datetime/date-time/adapter/moment-adapter/moment-date-time.module';

Thanks mate , you save my life. I have been looking for this. Thank You @ce-page 💯