diff --git a/src/android/nl/xservices/plugins/Calendar.java b/src/android/nl/xservices/plugins/Calendar.java index 58a3f2c..0413155 100644 --- a/src/android/nl/xservices/plugins/Calendar.java +++ b/src/android/nl/xservices/plugins/Calendar.java @@ -360,6 +360,11 @@ private void createEventInteractively(JSONArray args) { final JSONObject jsonFilter = args.getJSONObject(0); final JSONObject argOptionsObject = jsonFilter.getJSONObject("options"); + if(jsonFilter.getLong("startTime") > jsonFilter.getLong("endTime")){ + callback.error("The start date must be before the end date"); + return; + } + cordova.getThreadPool().execute(new Runnable() { @Override public void run() {