title: I want to transfer the date I selected to mainactivity but "date" is always empty
body: <p>This is code of Calender and I want to select it and it can be sent to mainactivity</p>
  
  <pre><code>public class CalendarActivity extends AppCompatActivity {
  
  private CalendarView calendarView;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_calendar);
      calendarView=(CalendarView)findViewById(R.id.calendarView);
      calendarView.setOnDateChangeListener(new CalendarView.OnDateChangeListener() {
          @Override
          public void onSelectedDayChange(@NonNull CalendarView view, int year, int month, int dayOfMonth) {
              String date=year+"/"+month+1+"/"+dayOfMonth;
              Intent intent=new Intent(CalendarActivity.this,MainActivity.class);
              intent.putExtra("date",date);
              startActivity(intent);
          }
      });
  }
  </code></pre>
  
  <p>}</p>
  
  <p>the part of code :</p>
  
  <pre><code>  String date=getIntent().getStringExtra("date");
      Toast.makeText(getApplicationContext(), date, Toast.LENGTH_SHORT).show();
  </code></pre>