活动管理日期过滤日期格式自定义 [英] Active Admin date filter date format customisation

查看:129
本文介绍了活动管理日期过滤日期格式自定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有简单的方法来从默认的ISO格式(yyyy-mm-dd)更改ActiveAdmin日期过滤器显示格式?

Is there simple way to change the ActiveAdmin date filter display format from the default ISO format (yyyy-mm-dd)?

推荐答案

而不是覆盖js,您可以为datepicker提供额外的选项,如下所示:

Instead of overwriting the js you can provide extra options to the datepicker like this:

 = f.input :my_date, as: :datepicker, datepicker_options: { dateFormat: "mm/dd/yy" }

这篇关于活动管理日期过滤日期格式自定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆