Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. function dateCustomValue(elem) {
  2. var localizedDatabaseFormat = BKG.DateTime.localizeFormat($(elem).data('srcformat')),
  3. sourceDatabaseFormat = BKG.DateTime.getMomentFormat($(elem).data('srcformat')),
  4. sourceFormat = BKG.DateTime.getMomentFormat(localizedDatabaseFormat);
  5. if ($(elem).val() === '') {
  6. return '';
  7. }
  8. return window.moment($(elem).val(), sourceFormat).format(sourceDatabaseFormat);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement