Skip to content

Instantly share code, notes, and snippets.

@Nublo
Created July 23, 2019 10:02
Show Gist options
  • Save Nublo/ddda31deadad6ae5149c7fbe7631e4ca to your computer and use it in GitHub Desktop.
Save Nublo/ddda31deadad6ae5149c7fbe7631e4ca to your computer and use it in GitHub Desktop.
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
if (edited) {
edited = false
return
}
var working = getEditText()
working = manageDateDivider(working, 2, start, before)
working = manageDateDivider(working, 5, start, before)
edited = true
input.setText(working)
input.setSelection(input.text.length)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment