<commit_before>// var exports = window;

(function($) {
  // Handle all things date/time related
  var DateTime = {};

  DateTime.init = function() {
    DateTime.rewriteInputs();
    DateTime.rewriteSpans();
  };

  DateTime.rewriteInputs = function() {
    // Rewrite all inputs with moment before instantiating Bootstrap datepicker
    $('.datepicker').each(function() {
      var $el = $(this);
      var date = $el.data('date');
      if (date) {
        $el.val(moment(date).format('l'));
      }

      props = {format: 'yyyy-mm-dd'}
      if($el.hasClass('deadline')) {
        props['startDate'] = '+2d'
      }
      if($el.hasClass('dob')) {
        props['endDate'] = '+0d'
      }
<commit_msg>datepicker now closes on select<commit_after>// var exports = window;

(function($) {
  // Handle all things date/time related
  var DateTime = {};

  DateTime.init = function() {
    DateTime.rewriteInputs();
    DateTime.rewriteSpans();
  };

  DateTime.rewriteInputs = function() {
    // Rewrite all inputs with moment before instantiating Bootstrap datepicker
    $('.datepicker').each(function() {
      var $el = $(this);
      var date = $el.data('date');
      if (date) {
        $el.val(moment(date).format('l'));
      }

      props = {format: 'yyyy-mm-dd', autoclose: true}
      if($el.hasClass('deadline')) {
        props['startDate'] = '+2d'
      }
      if($el.hasClass('dob')) {
        props['endDate'] = '+0d'
      }

{'fraction_non_alphanumeric': 0.17553559087767795, 'fraction_numerical': 0.0027643400138217, 'mean_word_length': 2.6109725685785534, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6305822', 'n_tokens_mistral': 474, 'n_tokens_neox': 454, 'n_words': 98}