buttons.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>DateBox Buttons - jQuery EasyUI Demo</title>
  6. <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
  7. <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
  8. <link rel="stylesheet" type="text/css" href="../demo.css">
  9. <script type="text/javascript" src="../../jquery.min.js"></script>
  10. <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
  11. </head>
  12. <body>
  13. <h2>DateBox Buttons</h2>
  14. <p>This example shows how to customize the datebox buttons underneath the calendar.</p>
  15. <div style="margin:20px 0;"></div>
  16. <div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
  17. <div style="margin-bottom:20px">
  18. <input class="easyui-datebox" label="Date With 2 Buttons:" labelPosition="top" style="width:100%;">
  19. </div>
  20. <div style="margin-bottom:20px">
  21. <input class="easyui-datebox" label="Date With 3 Buttons:" labelPosition="top" data-options="buttons:buttons" style="width:100%;">
  22. </div>
  23. </div>
  24. <script>
  25. var buttons = $.extend([], $.fn.datebox.defaults.buttons);
  26. buttons.splice(1, 0, {
  27. text: 'MyBtn',
  28. handler: function(target){
  29. alert('click MyBtn');
  30. }
  31. });
  32. </script>
  33. </body>
  34. </html>