Sunday, 30 June 2019

Disable few dates in Android using Android Date picker

final Calendar c = Calendar.getInstance();
mYear = c.get(Calendar.YEAR);
mMonth = c.get(Calendar.MONTH);
mDay = c.get(Calendar.DAY_OF_MONTH);


c.add(Calendar.DATE, 3);
DatePickerDialog datePickerDialog = new DatePickerDialog(view.getContext(),
        new DatePickerDialog.OnDateSetListener() {

            @Override            public void onDateSet(DatePicker view, int year,
                                  int monthOfYear, int dayOfMonth) {

                txtDate.setText(dayOfMonth + "-" + (monthOfYear + 1) + "-" + year);

            }
        }, mYear, mMonth, mDay);
datePickerDialog.getDatePicker().setMaxDate(c.getTimeInMillis());

c.add(Calendar.DATE, -6);
datePickerDialog.getDatePicker().setMinDate(c.getTimeInMillis());
datePickerDialog.show();

Pass a HashMap from Angular Client to Spring boot API

This example is for the case where fileData is very huge and in json format   let map = new Map<string, string>()      map.set(this.ge...