You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 lines
4.8 KiB

3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. (function($) {
  2. 'use strict';
  3. $(document).ready(function() {
  4. $("#dropper-default").dateDropper({
  5. dropWidth: 200,
  6. dropPrimaryColor: "#1abc9c",
  7. dropBorder: "1px solid #1abc9c"
  8. }),
  9. $("#dropper-animation").dateDropper({
  10. dropWidth: 200,
  11. init_animation: "bounce",
  12. dropPrimaryColor: "#1abc9c",
  13. dropBorder: "1px solid #1abc9c"
  14. }),
  15. $("#dropper-format").dateDropper({
  16. dropWidth: 200,
  17. format: "F S, Y",
  18. dropPrimaryColor: "#1abc9c",
  19. dropBorder: "1px solid #1abc9c"
  20. }),
  21. $("#dropper-lang").dateDropper({
  22. dropWidth: 200,
  23. format: "F S, Y",
  24. dropPrimaryColor: "#1abc9c",
  25. dropBorder: "1px solid #1abc9c",
  26. lang: "ar"
  27. }),
  28. $("#dropper-lock").dateDropper({
  29. dropWidth: 200,
  30. format: "F S, Y",
  31. dropPrimaryColor: "#1abc9c",
  32. dropBorder: "1px solid #1abc9c",
  33. lock: "from"
  34. }),
  35. $("#dropper-max-year").dateDropper({
  36. dropWidth: 200,
  37. dropPrimaryColor: "#1abc9c",
  38. dropBorder: "1px solid #1abc9c",
  39. maxYear: "2020"
  40. }),
  41. $("#dropper-min-year").dateDropper({
  42. dropWidth: 200,
  43. dropPrimaryColor: "#1abc9c",
  44. dropBorder: "1px solid #1abc9c",
  45. minYear: "1990"
  46. }),
  47. $("#year-range").dateDropper({
  48. dropWidth: 200,
  49. dropPrimaryColor: "#1abc9c",
  50. dropBorder: "1px solid #1abc9c",
  51. yearsRange: "5"
  52. }),
  53. $("#dropper-width").dateDropper({
  54. dropPrimaryColor: "#1abc9c",
  55. dropBorder: "1px solid #1abc9c",
  56. dropWidth: 500
  57. }),
  58. $("#dropper-dangercolor").dateDropper({
  59. dropWidth: 200,
  60. dropPrimaryColor: "#e74c3c",
  61. dropBorder: "1px solid #e74c3c",
  62. }),
  63. $("#dropper-backcolor").dateDropper({
  64. dropWidth: 200,
  65. dropPrimaryColor: "#1abc9c",
  66. dropBorder: "1px solid #1abc9c",
  67. dropBackgroundColor: "#bdc3c7"
  68. }),
  69. $("#dropper-txtcolor").dateDropper({
  70. dropWidth: 200,
  71. dropPrimaryColor: "#46627f",
  72. dropBorder: "1px solid #46627f",
  73. dropTextColor: "#FFF",
  74. dropBackgroundColor: "#e74c3c"
  75. }),
  76. $("#dropper-radius").dateDropper({
  77. dropWidth: 200,
  78. dropPrimaryColor: "#1abc9c",
  79. dropBorder: "1px solid #1abc9c",
  80. dropBorderRadius: "0"
  81. }),
  82. $("#dropper-border").dateDropper({
  83. dropWidth: 200,
  84. dropPrimaryColor: "#1abc9c",
  85. dropBorder: "2px solid #1abc9c"
  86. }),
  87. $("#dropper-shadow").dateDropper({
  88. dropWidth: 200,
  89. dropPrimaryColor: "#1abc9c",
  90. dropBorder: "1px solid #1abc9c",
  91. dropBorderRadius: "20px",
  92. dropShadow: "0 0 20px 0 rgba(26, 188, 156, 0.6)"
  93. }),
  94. $('#inlinedatetimepicker').datetimepicker({
  95. inline: true,
  96. sideBySide: true
  97. });
  98. $('#datepicker').datetimepicker({
  99. format: 'L'
  100. });
  101. $('#timepicker').datetimepicker({
  102. format: 'LT'
  103. });
  104. $('.demo').each( function() {
  105. //
  106. // Dear reader, it's actually very easy to initialize MiniColors. For example:
  107. //
  108. // $(selector).minicolors();
  109. //
  110. // The way I've done it below is just for the demo, so don't get confused
  111. // by it. Also, data- attributes aren't supported at this time...they're
  112. // only used for this demo.
  113. //
  114. $(this).minicolors({
  115. control: $(this).attr('data-control') || 'hue',
  116. defaultValue: $(this).attr('data-defaultValue') || '',
  117. format: $(this).attr('data-format') || 'hex',
  118. keywords: $(this).attr('data-keywords') || '',
  119. inline: $(this).attr('data-inline') === 'true',
  120. letterCase: $(this).attr('data-letterCase') || 'lowercase',
  121. opacity: $(this).attr('data-opacity'),
  122. position: $(this).attr('data-position') || 'bottom left',
  123. swatches: $(this).attr('data-swatches') ? $(this).attr('data-swatches').split('|') : [],
  124. change: function(value, opacity) {
  125. if( !value ) return;
  126. if( opacity ) value += ', ' + opacity;
  127. if( typeof console === 'object' ) {
  128. console.log(value);
  129. }
  130. },
  131. theme: 'bootstrap'
  132. });
  133. });
  134. })
  135. })(jQuery);