0
我想一個新的項目添加到使用podio.ItemService.AddNewItem
我的應用程序之一,但我不斷收到此錯誤:加入新的項目與DateItemField錯誤
Start and end must both be with time or both must be without time
有在應用的兩DateItemFields
。
var my_due_date = myNewItem.Field<DateItemField>("proposal-due-date");
my_due_date.Start = DateTime.Now;
my_due_date.End = DateTime.Now.AddMonths(2);
var my_flight_date = myNewItem.Field<DateItemField>("expected-flight-date");
my_flight_date.Start = DateTime.Now;
my_flight_date.End = DateTime.Now.AddMonths(6);
我在這裏錯過了什麼?
尖端:日期時間值具有日期屬性,其中時間濾出(設置爲00:00:00) –
@HansKesting我知道,但我需要日期作爲來自客戶端的輸入。使用DateTime.Now僅用於在沒有任何工作時進行測試 – Gigi