c# - Change DateTimePicker Format different from Windows Format -
i have done system contains lot of forms use datetimepicker. need publish in country different date format mine. did search , found property can put custom format. don't want seek system datetimepicker put property.
is there better way this?
if want force specific format datetimepicker
objects have, have no choice other going through them , setting values of datetimepicker.format
, datetimepicker.customformat
. reason limitation objects totally independent. no change on specific object affect object (unless expressed in logic flow).
you might want create global application variable , reference in existing datetimepicker
objects. 1 time action. later on able change value of global variable reflected in existing objects.
i assume (out of question title) know default format of windows, or more of culture configuration on host machine. deploying country mean deploying host running other culture configurations (which automatically reflected datetimepicker
objects in application.
please keep in mind forcing people use format defining might annoying. case example have en-us
culture configured on machine live in denmark. appreciate see date in en-us
rather in da-dk
(although specific case, difference not much, days naming).
Comments
Post a Comment