I am using the current date using the code as below
long millis=System.currentTimeMillis(); java.sql.Date date=new java.sql.Date(millis);
And I choose the date using
CalendarView cal.setOnDateChangeListener(new OnDateChangeListener() { @Override public void onSelectedDayChange(CalendarView view, int year, int month, int dayOfMonth) String s = +year + " : " + (month + 1) + " : " +dayOfMonth ;
and passing it on to the next action as -
Intent in = new Intent(MainActivity.this, sec.class); in.putExtra("TextBox", s.toString()); startActivity(in);
I want to check here if the user selected the previous date from the current date then give a message and not continue the next operation.
source share