Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
datetimepicker アドオンにクリア ボタンを追加するにはどうすればよいですか。完了ボタンをクリアボタンに交換しようと考えていました。
一意の ID を使用して HTML でボタンを作成します。jQueryでこれを書いて...
$("#yourbuttonid").click(function(){ $("#thedattimepicker").val(""); });
クリックすると、関数で指定した要素の値がクリアされます。関数のコードの 2 行目を複製してセレクターを増やすだけで、より多くの要素をクリアできます。