Open DE-TriNguyen opened 7 years ago
Workaround :
import { Md2Datepicker } from 'md2'; Md2Datepicker.prototype._handleBlur = function (event) { return; };
and it's working like a charm
@DE-TriNguyen Unfortunately, this approach still makes the "md2-datepicker-input-focused" class remain. I'm also struggling with it... 😢
i suggest you ->
(DateUtil.prototype as any).createDate = (year, month, date, hours, minutes, seconds) => {
let ret = new Date(year, month, date, hours, minutes, seconds);
return ret.getMonth() == month ? ret : new Date(year, month + 1, 0, hours, minutes, seconds);
}
Bug, feature request, or proposal:
BUG : Datepicker auto -1 month when use format properties
What is the expected behavior?
Datepicker don't auto -1 month when use format properties
What is the current behavior?
BUG : Datepicker auto -1 month when use format properties
What are the steps to reproduce?
Providing a Plunker (or similar) is the best way to get the team to see your issue. Plunker template: http://plnkr.co/edit/rQmUz8WYRh5Vz4gwY8E4?p=info
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, MD2, OS, browsers are affected?
Angular 2, Chrome
Is there anything else we should know?
I found ur Md2Datepicker.prototype._handleBlur() make this happen