Comments (7)
I'm having the same issue. I'm unable to specify how dates are formatted. As a temporary workaround (NOT a fix), I've changed my column to be a text field type: text
.
columns:
title:
label: Title
text: '{{ page.title }}'
type: text
date:
label: Date
type: text
text: '{{ page.date.toDate('M. d, Y') }}'
# for only years like 2014 use 'Y'
# text: '{{ page.date.toDate('Y') }}'
Could this have something to with how tbl-for-kirby
handles dates?
from kirby-pagetable.
Have you tried this yet?
text: '{{ page.earliestdate.toDate }}'
or:
text: '{{ page.earliestdate.toDate('YYYY') }}'
from kirby-pagetable.
I tried it now, both these options result in the output Invalid date
.
from kirby-pagetable.
Nice! This works for me.
But, as you said, since this is not an actual fix for the feature, I will leave the issue open for now.
from kirby-pagetable.
Also having this problem, thanks for hint. By the way, it was working as "type: date" with earlier version of Kirby, about year ago. Would work like this:
date:
label: Date
type: date
text: '{{ page.modified("Y-m-d-H-i") }}'
dateInputFormat: 'YYYY-MM-DD-HH-mm'
dateOutputFormat: 'DD-MM, HH:mm'
from kirby-pagetable.
tbl-for-kirby specifies how the date is formatted without an option to style it: https://github.com/distantnative/tbl-for-kirby/blob/master/src/component/Table.vue#L544
so the dateInputFormat
and dateOutputFormat
keys are obsolete since c731edd.
from kirby-pagetable.
I will revert to using vue-good-table
for now, so this formatting rule will apply. Keeping tbl is hard to maintain for me.
I will probably update to something like a tbl-for-kirby
custom-made for this section (but keeping the compatibility for this date format thing), like Retour does now (which shared the use of tbl previously) whenever I find time to work on the enhancement requests.
from kirby-pagetable.
Related Issues (20)
- Incompatible with 3.6.0 HOT 4
- Add files to the table HOT 1
- use different URL in table HOT 2
- Amazing plugin: just a little question about the mobile view HOT 1
- Delete button deactivated HOT 2
- Translation Error
- Version 1.1 breaks compatibility with Kirby 3.5. HOT 2
- Prevent clicking on cells/rows HOT 1
- rowsPerPage custom translation in blueprint doesn't work HOT 1
- SortBy column data? HOT 2
- Setting "create: true" throws error on adding a page HOT 1
- Image via query not working HOT 1
- 3.7 Compatibility HOT 5
- Cannot read properties of undefined (reading '_wrapper') HOT 2
- Bug: 'undefined array key "text"' HOT 1
- New pages not created in the correct folder HOT 4
- Search input outside container
- Performance when storing pages with SQLite HOT 1
- Query Outdated HOT 3
- [K4] 4.0 Compatibility HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kirby-pagetable.