x
1
2
3
4
5
<span class="lui-date-show">06-12-2025 11h35</span><br><span class="lui-date-show">06-12-2025 11h35</span><br><span class="lui-date-show">10-07-2016</span>Description
The DateShow component is a string that changes the way dates are presented.
Related components
| Used Components | Components where is Used |
|---|---|
| Table |
Usage rules
- ✅ Do
- Use for handling dates in tables
- ❌ Don't
1
2
3
4
5
6
7
8
9
10
<% date = DateTime.now string_date = DateTime.now.to_s best_day = DateTime.new(2016,07,10)%><%= render LooposUi::DateShow.new(date: date) %><br><%= render LooposUi::DateShow.new(date: string_date) %><br><%= render LooposUi::DateShow.new(date: best_day, format: :short) %>No notes provided.
No params configured.
Description
The DateShow component is a string that changes the way dates are presented.
Arguments
| Property | Type | Description |
|---|---|---|
date |
String/DateTime | Date that will be converted. Right now it can handle either String type or DateTime type |
format |
Symbol | Format of the printed date, it can be either :short(doesn't display hours) or :long(displays hours). Default option is :long |
Usage Example
<%= render LooposUi::DateShow.new(date: DateTime.now, format: :short) %>