CrossGeeks / ClearableDatePickerSample

Clearable DatePicker Sample in Xamarin Forms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not work with Xamarin Forms 2.5

Roller007 opened this issue · comments

When creating a ViewRenderer<NullableDatePicker, EditText> in 2.5 the android render constructor needs to be created like:

NullableDatePickerRenderer(Context context): base(context)

This seems to be causing the renderer to crash. I'm new to Xamarin and have tried a few work arounds with no luck. Any help would be appreciated.

Updated the sample to XF 2.5, let me know if still have any issues.

I've looked at your changes and am still having the same issue. When I debug and set break points it seems to work fine in the NullableDatePicker code. When it comes to the constructor in the renderer it fails. Unfortunately it fails with "No compatible code running" so I don't know what the exact error is but it never gets past the base constructor of the renderer.

I've tried other peoples custom nullable date pickers with renders and they work perfectly fine but they are not as nice of a solution as this nullable picker is if I could get it working.

Other date picker renders inherit from DatePickerRenderer instead of ViewRenderer<NullableDatePicker, EditText>. I suspect passing a context to ViewRenderer is causing some issue.

I resolved the issue. I updated my android sdk's and that seemed to solve the problem. This can be closed.