Dear all,
I am new to Pagekit and Vue.js and really impressed! Currently I am developing my own extension and - so far - its quite perfect. Except one little thing...
The Problem:
I have a model "Transfer" and I want to change its database entries through an admin panel with Vue.JS.
I can create new "Transfers" and change all its entries and values, except a column of type datetime, in my case its called "created".
Whenever I pass "transfer.created" to <input-date> like so:
The datetime picker renders the date but not the time.
When I try to change the value I always get "Invalid date" and the console says:
- Deprecation warning: moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.
- s @ datepicker.min.js:2
- (anonymous) @ datepicker.min.js:2
- K @ datepicker.min.js:2
- ee @ datepicker.min.js:2
- ce @ datepicker.min.js:2
- De @ datepicker.min.js:2
- get @ vue.js?v=f578:5002
- Watcher.get @ vue.js?v=f578:3292
- Watcher.evaluate @ vue.js?v=f578:3475
- computedGetter @ vue.js?v=f578:8196
- (anonymous) @ VM5833:3
- Watcher.get @ vue.js?v=f578:3292
- Watcher.run @ vue.js?v=f578:3433
- runBatcherQueue @ vue.js?v=f578:3190
- flushBatcherQueue @ vue.js?v=f578:3160
- nextTickHandler @ vue.js?v=f578:451
- Promise.then (async)
- timerFunc @ vue.js?v=f578:466
- (anonymous) @ vue.js?v=f578:500
- pushWatcher @ vue.js?v=f578:3224
- Watcher.update @ vue.js?v=f578:3422
- Dep.notify @ vue.js?v=f578:2122
- reactiveSetter @ vue.js?v=f578:2413
- setPath @ vue.js?v=f578:2906
- (anonymous) @ vue.js?v=f578:3067
- Watcher.set @ vue.js?v=f578:3328
- self.childWatcher.Watcher.sync @ vue.js?v=f578:6529
- Watcher.run @ vue.js?v=f578:3459
- Watcher.update @ vue.js?v=f578:3411
- Dep.notify @ vue.js?v=f578:2122
- reactiveSetter @ vue.js?v=f578:2413
- setPath @ vue.js?v=f578:2906
- (anonymous) @ vue.js?v=f578:3067
- Vue.$set @ vue.js?v=f578:9077
- set @ vue.js?v=f578:5010
- (anonymous) @ vue.js?v=f578:220
- setPath @ vue.js?v=f578:2906
- (anonymous) @ vue.js?v=f578:3067
- Watcher.set @ vue.js?v=f578:3328
- (anonymous) @ vue.js?v=f578:8627
- Directive._withLock @ vue.js?v=f578:8644
- Directive.set @ vue.js?v=f578:8626
- listener.rawListener @ vue.js?v=f578:4875
- dispatch @ jquery.js:4435
- r.handle @ jquery.js:4121
- trigger @ jquery.js:4350
- (anonymous) @ jquery.js:4901
- each @ jquery.js:374
- each @ jquery.js:139
- trigger @ jquery.js:4900
- (anonymous) @ datepicker.min.js:2
- dispatch @ jquery.js:4435
- r.handle @ jquery.js:4121
If I try to display the date directly like this:
I get this:
What I have tried:
I had a look at the blog-extension and copied and pasted nearly everthing related from BlogController.php, PostApiController.php, post-edit.php, post-edit.js and post-settings.vue.
In the blog-extension the "post.date" renders like a charm - in my extension not. It really drives me crazy!
Can anybody give me a hint? What am I doing wrong?
Cheers,
Andre