/// <summary> /// Событие на смену начальной даты, в конечной дате день ставим из начальной даты /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnSelectedDateChanged(object sender, EventArgs e) { if (!IsLoaded || !(sender is Xceed.Wpf.Controls.DatePicker)) { return; } Xceed.Wpf.Controls.DatePicker dtPicker = sender as Xceed.Wpf.Controls.DatePicker; DatePickerHelper.CorrectDateStartOrDateEnd(dateStart, dateEnd, dtPicker.Name == "dateStart"); }
private void EventtxtDataEmissao_Click(object sender, EventArgs e) { DatePickerHelper frag = DatePickerHelper.NewInstance(delegate(DateTime time) { txtDataEmissao.Text = time.ToString("dd/MM/yyyy", CultureInfo.GetCultureInfo("pt-BR")); }); frag.Show(FragmentManager, DatePickerHelper.TAG); }
private void TxtDataEntrega_Click(object sender, EventArgs e) { DatePickerHelper frag = DatePickerHelper.NewInstance(delegate(DateTime time) { //var teste = DateTime.Now.ToString("hh:mm:ss"); txtDataEntrega.Text = time.ToString("dd/MM/yyyy", CultureInfo.GetCultureInfo("pt-BR")); }); frag.Show(FragmentManager, DatePickerHelper.TAG); }
public void DatePicker_should_render_HTML_imput_with_name_only() { var vc = new ViewContext(); vc.HttpContext = new FakeHttpContext(); var hh = new HtmlHelper(vc, new FakeViewDataContainer()); var result = DatePickerHelper.DatePicker(hh, "pickerClass", "pickerName").ToString(); Assert.IsTrue(result.Contains("<div class=\"input-group pickerClass\"")); }
public void DatePicker_should_render_HTML_input_with_date() { var vc = new ViewContext(); vc.HttpContext = new FakeHttpContext(); var hh = new HtmlHelper(vc, new FakeViewDataContainer()); var result = DatePickerHelper.DatePicker(hh, "pickerClass", "pickerName", DateTime.Now).ToString(); Assert.IsTrue(result.Contains("<div class=\"input-group pickerClass\"") && result.Contains("value=\"" + DateTime.Now.ToString("dd-MMM-yyyy"))); }
/// <summary> /// Событие на смену начальной даты, в конечной дате день ставим из начальной даты /// </summary> private void OnSelectedDateChanged(bool isStartChanged) { DatePickerHelper.CorrectDateStartOrDateEnd(startDate.dpDate, endDate.dpDate, isStartChanged); }