Thingse/app/src/main/java/com/daneshzaki/thingse/DatePickerFragment.java
//set the selected date in the ui control
set the selected date in the ui control
set the selected date in the ui control
public void onDateSet(DatePicker view, int year, int month, int day)
	{
		month++;
		String monStr = String.valueOf(month);
		String dayStr = String.valueOf(day);
		if(month < 10)
		{
			monStr = "0"+month;
		}
		if(day < 10)
		{
			dayStr = "0"+day;
		}
		selDate = year+"-"+monStr+"-"+dayStr;
		Log.i("DatePickerFragment", "sel date is "+selDate);
		datePurchButton.setText(selDate);
	}
public void onDateSet ( DatePicker view , int year , int month , int day ) { month ++ ; String monStr = String . valueOf ( month ) ; String dayStr = String . valueOf ( day ) ; if ( month < 10 ) { monStr = "0" + month ; } if ( day < 10 ) { dayStr = "0" + day ; } selDate = year + "-" + monStr + "-" + dayStr ; Log . i ( "DatePickerFragment" , "sel date is " + selDate ) ; datePurchButton . setText ( selDate ) ; }
set the selected date in the ui control
set the selected date in the ui control
//set selected date //append zeros to fix sort issue