Advertisement
RyanJEarnshaw

Untitled

Oct 12th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. webshim.setOptions('forms-ext', {
  2. replaceUI: 'auto',
  3. types: 'date',
  4. date: {
  5. startView: 2,
  6. inlinePicker: true,
  7. classes: 'hide-inputbtns'
  8. }
  9. });
  10. webshim.setOptions('forms', {
  11. lazyCustomMessages: true
  12. });
  13. //start polyfilling
  14. webshim.polyfill('forms forms-ext');
  15.  
  16. //only last example using format display
  17. $(function () {
  18. $('.format-date').each(function () {
  19. var $display = $('.date-display', this);
  20. $(this).on('change', function (e) {
  21. //webshim.format will automatically format date to according to webshim.activeLang or the browsers locale
  22. var localizedDate = webshim.format.date($.prop(e.target, 'value'));
  23. $display.html(localizedDate);
  24. });
  25. });
  26. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement