Skip to content

Commit

Permalink
fix:#1216 Minimum date picker fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
haran2248 committed Feb 26, 2021
1 parent 2e6ae77 commit 9bc7822
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import org.mifos.mobilewallet.mifospay.standinginstruction.presenter.StandingIns
import org.mifos.mobilewallet.mifospay.utils.Constants
import org.mifos.mobilewallet.mifospay.utils.DialogBox
import org.mifos.mobilewallet.mifospay.utils.Utils
import java.text.SimpleDateFormat
import java.util.*
import javax.inject.Inject

Expand All @@ -40,6 +41,7 @@ class SIDetailsActivity : BaseActivity(), StandingInstructionContract.SIDetailsV
lateinit var mPresenter: StandingInstructionDetailsPresenter
private lateinit var mStandingInstructionPresenter:
StandingInstructionContract.StandingInstructorDetailsPresenter
private lateinit var mOptionsMenu: Menu

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Expand Down Expand Up @@ -68,6 +70,7 @@ class SIDetailsActivity : BaseActivity(), StandingInstructionContract.SIDetailsV
DatePickerDialog.OnDateSetListener { view, year, monthOfYear, dayOfMonth ->
tv_valid_till.text = "$dayOfMonth-${(monthOfYear + 1)}-$year"
}, year, month, day)
picker.datePicker.minDate = SimpleDateFormat("dd-MM-yyyy",Locale.getDefault()).parse(tv_valid_from.text.toString()).time
picker.show()
}

Expand Down

0 comments on commit 9bc7822

Please sign in to comment.