mohamad-amin / PersianMaterialDateTimePicker

An Android library containing a shamsi (persian calendar) date picker and a time picker with Material Design style
328 stars 89 forks source link

Use DatePicker inside a fragment #59

Open mohammadso opened 7 years ago

mohammadso commented 7 years ago

when calling the show method inside a fragment, what should i pass as the first argument. when trying to pass "getFragmentManager", i get this error:

can not resolve method 'show (android.support.v4.app.FaragmentManger, java.lang.String)

mrshamshir commented 7 years ago

you should pass parent which is an activity to constructor of fragment , then try this : parent.getFragmentManager()

MChavoshi96 commented 7 years ago

or you could use dpd.show(getActivity().getFragmentManager(), DATEPICKER);

golnarSheikhBahaie commented 5 years ago

thnx that was usefull for me :)