I was lookin at the sample below.
Date of inspection field is not responding when clicking the month navigation. in the sample and I can change the date in the same month. I do not se any min or max vakues set.
Is there something I missed?
Markos
Solved! Go to Solution.
This appears to be a bug in the esri/chunks/calcite-input-date-picker module, and I don't think there's much you can do about it. You'll notice when you click on the arrow for the next month, the calender does flash briefly to the next month, but then gets reset. Whenever certain elements on the form are clicked, the values on the form are reset from a copy of the values in memory. Therefore, the value does get set to the next month when you click the arrow, but it immediately gets reset due to conflicting event handlers.
Within the aforementioned module, this handler executes when you click one of the previous or next month arrows:
this.handleArrowClick = (a,b)=>{
a.preventDefault();
this.calciteInternalDatePickerSelect.emit(b)
}
If it were changed to this, it would work properly (note addition at line 3):
this.handleArrowClick = (a,b)=>{
a.preventDefault();
a.cancelBubble = true; //added line
this.calciteInternalDatePickerSelect.emit(b)
}
If you're hosting the API locally, you can apply this change. If not, perhaps it will get fixed in a future release.
There doesn't appear to be an "inpt_date" field in the underlying data. I don't know if this is what's affecting the date picker. You can manually put in another month by typing it in.
This appears to be a bug in the esri/chunks/calcite-input-date-picker module, and I don't think there's much you can do about it. You'll notice when you click on the arrow for the next month, the calender does flash briefly to the next month, but then gets reset. Whenever certain elements on the form are clicked, the values on the form are reset from a copy of the values in memory. Therefore, the value does get set to the next month when you click the arrow, but it immediately gets reset due to conflicting event handlers.
Within the aforementioned module, this handler executes when you click one of the previous or next month arrows:
this.handleArrowClick = (a,b)=>{
a.preventDefault();
this.calciteInternalDatePickerSelect.emit(b)
}
If it were changed to this, it would work properly (note addition at line 3):
this.handleArrowClick = (a,b)=>{
a.preventDefault();
a.cancelBubble = true; //added line
this.calciteInternalDatePickerSelect.emit(b)
}
If you're hosting the API locally, you can apply this change. If not, perhaps it will get fixed in a future release.