Feature request: when given empty string it should output an error message that is customizable.See original GitHub issue
Hi there, first thanks for this library it works like a charm !! I just love using it instead of directly hooking momentJS to the project. the only drawback I can see is that when given an empty string as the date to filter it outputs the date of today and there is no way to check on a data if it’s empty or not before filtering it in vueJS.
So my proposition is adding a methods mixin so we can use the
moment() as a function if filters are not the solution the situation.
And thanks for your time.
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
I think this is a smart idea. I feel like this is an instance where moment shouldn’t try to assume the nature of the input. If someone wants to filter the current date, they should pass in
Date.now() or a variable representing it. If the date input is null, the filter should fail, or at least log a warning in console.