PersianMaterialDateTimePicker icon indicating copy to clipboard operation
PersianMaterialDateTimePicker copied to clipboard

Use DatePicker inside a fragment

Open mohammadso opened this issue 7 years ago • 3 comments

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)

mohammadso avatar Jul 29 '17 15:07 mohammadso

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

mrshamshir avatar Jul 30 '17 12:07 mrshamshir

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

MChavoshi96 avatar Aug 20 '17 08:08 MChavoshi96

thnx that was usefull for me :)

golnarSheikhBahaie avatar May 28 '19 11:05 golnarSheikhBahaie