Guest User

Untitled

a guest
Jan 22nd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. # This patch file was generated by NetBeans IDE
  2. # This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
  3. # It uses platform neutral UTF-8 encoding.
  4. # Above lines and this line are ignored by the patching process.
  5. --- ...wp-content\plugins\pods\ui\js\date_input.orig.js
  6. +++ ...\wp-content\plugins\pods\ui\js\date_input.js
  7. @@ -96,8 +96,14 @@
  8.  
  9. stringToDate: function() {
  10. var input = this.input.val();
  11. + var currentDate;
  12. matches = input.match(/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/);
  13. - var currentDate = new Date(matches[1], matches[2] - 1, matches[3], matches[4], matches[5], matches[6]);
  14. \ No newline at end of file
  15. + if (matches[1] == "0000") {
  16. + currentDate = new Date();
  17. + }
  18. + else {
  19. + currentDate = new Date(matches[1], matches[2] - 1, matches[3], matches[4], matches[5], matches[6]);
  20. + }
  21. \ No newline at end of file
  22. this.selectMonth(currentDate);
  23. },
Add Comment
Please, Sign In to add comment