Javascript comparison not working in Microsoft Edge
I created a calendar with JavaScript only; I need to compare dates of events stored in <<Element.dataset.date>>
with dates retrieved from a database, it works fine with Chrome and Firefox but not Edge.
var td = document.querySelector('td');
var date = new Date('2017-06-22');
td.dataset.date = date.toLocaleDateString();
console.log(td.dataset.date === '22/06/2017');
// Output true with Firefox and Chrome but false with Edge
<table>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
...
</table>
+3
Zakaria Othmane
source
to share
No one has answered this question yet
See similar questions:
8
five
or similar:
7649
7494
7432
7287
5722
5670
5101
4829
4380
1949