Don't show DatePicker on input focus, only icon click

时间:2017-10-12 10:07:19

标签: antd

The docs doesn't mention this, but does anyone know if it's possible to only show the DatePicker on icon click (or button), and not when the input field receives focus?

Users will primarily enter dates using the keyboard and doesn't want the DatePicker displayed, unless specifically asked for.

1 个答案:

答案 0 :(得分:1)

您可以查看完整的API here,其中包含一些未在AntDesign网站上记录的选项。但是没有选择来实现你想要的目标。

您需要将文本输入与按钮组合以弹出选择器,这是与$(".signup-btn").on('click', function() { $(".prelogin").css({zIndex:99}).fadeIn(200); $(".login-screen").css({zIndex:90}).fadeOut(200); }); 使用的范例不同的范例。它可能是&#34;黑客攻击&#34;将普通<DatePicker><Input>与仅显示按钮的自定义CSS和一些Javascript事件处理程序相结合。