sutty/app/views/posts/attributes/_date.haml

8 lines
400 B
Text
Raw Normal View History

2019-11-15 14:13:21 +00:00
.form-group
= label_tag "#{base}_#{attribute}", post_label_t(attribute, post: post)
= date_field base, attribute, value: metadata.value.to_date.strftime('%F'),
**field_options(attribute, metadata), pattern: '\d{4}-\d{2}-\d{2}',
data: { 'pattern-mismatch': t('metadata.date.invalid_format') }
2019-11-15 14:13:21 +00:00
= render 'posts/attribute_feedback',
post: post, attribute: attribute, metadata: metadata