如何在引导日期选择器中自动选择当前日期或选定日期

问题描述 投票:0回答:1

$('.datepicker').datepicker({ 格式:“年-月-日”, 强制解析:假, 自动关闭:真, 默认日期:'现在', });

$('.datepicker').datepicker({ 格式:“年-月-日”, 强制解析:假, 自动关闭:真, 开始日期:今天, });

enter image description here 选择如图所示的日期,

bootstrap-datepicker
1个回答
0
投票

使用 $('.datepicker').datepicker({ format: "yyyy-mm-dd", forceParse: false, autoclose: true, TodayHighlight: true, });

© www.soinside.com 2019 - 2024. All rights reserved.