Why can't there be a default date first? Jquery

http://www.daterangepicker.co.

I found that this suite can change the date range
, but I found that if you put the default date in value, you will see Invalid date and then cancel

.
<input type="text" name="datefilter" value="<?=$_GET["start"]." - ". $_GET["end"] : $todayDisplay . " - " . $todayDisplay;?>">

my default is that there is no selected date, so today"s date todayDisplay-todayDisplay is 2018-08-31-2018-08-31 , but it doesn"t work? How to make him accept the default value?
there are several other kinds that are possible

clipboard.png


set to this format 08 code

if you insist on using the 2018-08-31 format, you can add the locale option when initializing datepicker, as shown below

$(function() {
  $('input[name="daterange"]').daterangepicker({
    opens: 'left',
    locale: {
      format: 'YYYY-MM-DD'
    }
  }, function(start, end, label) {
    console.log("A new date selection was made: " + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
  });
});
</script>

  1. date and time problems, check the required format first;
  2. hard debugging. If PHP doesn't work, HTML directly writes it, and HTML doesn't want to copy the original code in the Demo given by the plug-in's official website, and then change to a version that can run normally, and then check where the code that can run in the end is different from the one written before.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e93f38-1499.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e93f38-1499.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?