Custom format (or regex) with moment.js
<p>It is possible to define some custom format containing a string to be ignored by moment.js ?</p>

<p>I have a date string like the following:</p>

<p><code>14-Apr [not valid]</code></p>

<p>I do not have the possibility of changing the date before passing it through moment.js and I'm wondering if moment.js would provide a way to deal with cases like this one.</p>

<p>Moment.js is being used by <a href="https://github.com/dbushell/Pikaday" rel="nofollow">pikaday.js</a> library which at the same time is being used by <a href="https://docs.handsontable.com/0.22.0/demo-date.html" rel="nofollow">handsontable.js library</a>. </p>

<p>pikaday.js <a href="https://github.com/dbushell/Pikaday/issues/488" rel="nofollow">doesn't have a callback such as <code>onBeforeOpen</code></a> and handsontable.js doesn't provide it either. </p>