on 11-30-2018 4:32 AM
I have 4 fields.
1. Start Time
2.End Time
3.Break start time
4.Break end time
validation rules :
1.Here startTime should not greater than endTime.
2.breakTime should not lesser than startTime and should not greater than breakEndTime and endTime.
3.breakStartTime and breakEndTime should be within the range of startTime and Endtime.
4.breakEndTime should not be less than startTime, breakStartTime and should not be greater than endTime.
5. These all four times hould be compared after converting the actual time to epoch.
I'm new to openui5. I kindly request community to help
To get the time from a date input in SAPUI5 you can do something like this
//Javascript date obj
var date1 = this.getView().byId("date-input-id1").getDateValue();
var date2 = this.getView().byId("date-input-id2").getDateValue();
//Parse just incase.
if(Date.parse(date1) < Date.parse(date2)){
//Date 1 smaller that date 2
}
https://sapui5.hana.ondemand.com/#/api/sap.m.DatePicker/methods/Summary
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Like saurabh vakil mentioned, you need to tell us the issue, this is more like a requirement rather than an issue you are facing.
Try exploring more in sap blogs/questions regarding your query like how to get the time from the UI5 control and your question is more related to Javascript than ui5.. Check Stackoverflow on how to compare times & dates..
After that, when you implement your solution, if you get any issue than we can discuss here..
BR,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would appreciate it if you can let us know what you have tried so far and where are you getting stuck?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.