I am now using default UIDatePicker which show only date in my UIDatePicker view.The point is, I want to limit my datepicker for showing with range and disable every sunday from that picker cause I am creating auction app.Auction close on sunday,so I need to hide every sunday in my UIDatePicker.Also I want to show from unlimited date from past to current date only.
Simple,
1.Setting date range from (unlimited date which was past to current date only) [....dd/MM/yyyy to...current date only]
2.When I show a datepicker,I dont want to display sunday in that UIDatePicker.
Here is what I have in java code
Map<String, String> auctionDate = new LinkedHashMap<String, String>();
SimpleDateFormat sdfDDMMYYYYEEE = new SimpleDateFormat("dd/MM/yyyy (EEE)");
SimpleDateFormat sdfDDMMYYYY = new SimpleDateFormat("dd/MM/yyyy");
SimpleDateFormat sdfEEE = new SimpleDateFormat("EEE");
for (int i = 0; i < 5; i++) {
if (sdfEEE.format(now).equals("Sun")) {
now.setTime(now.getTime() + 86400000);
i--;
continue;
}
auctionDate.put(sdfDDMMYYYY.format(now), sdfDDMMYYYYEEE.format(now));
now.setTime(now.getTime() + 86400000);
}
Is there anyway I can set this in Swift?Thank you...
UIPickerViewand set the data source manually, or you could do something like this. Simply check for[components day]