0

Datebox1 constraint after datebox2 in MVVM

asked 2016-06-09 10:21:01 +0800

soufianek gravatar image soufianek
1

hi , i have 2 datebox , i want that the date of datebox2 must be after the date of datebox1.(Datebox1 constraint after datebox2 )

Thanks in advance

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-06-09 11:18:04 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9
https://github.com/chillw...

This means no empty if date1 is empty everything is possible, if date1 isn't empty => the after is filled in also.

constraint="@load(c:cat('no empty',empty fx.date1?'':c:cat(', after ',vm.formatDate(fx.date1))))"

where the formatDate method :

 public String formatDate(Date date) {
    return new SimpleDateFormat("yyyyMMdd").format(date);
}
link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2016-06-09 10:21:01 +0800

Seen: 19 times

Last updated: Jun 09 '16

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More