我在我的 Rails 应用程序中使用https://github.com/TrevorS/bootstrap3-datetimepicker-rails datetimepicker。单击今天按钮后,我们如何关闭小部件?
$(document).on('turbolinks:load', () => {
$(".form_datetime").datetimepicker({
timeZone: 'utc',
format: "YYYY-MM-DD HH:mm:ss UTCZ",
defaultDate: moment().tz('UTC'),
icons: {
today: 'todayText',
up: 'glyphicon glyphicon-chevron-up',
up: "fa fa-arrow-up",
down: "fa fa-arrow-down",
previous: " fa fa-arrow-left",
next: "fa fa-arrow-right"
},
showTodayButton: true,
ignoreReadonly: true,
allowInputToggle: true,
useCurrent: true,
});