Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

SAPUI5 : How to set the date value format for DateTimeInput?

$
0
0

Hi SAPUI5 experts:

 

I'd like ask 2 things regarding the control: sap.m.DateTimeInput

 

1: Here is I want to do: show the current date (May 1, 2014) in the control in format as "01-05-2014". But by default the following code shows "May 1 2014". How can I show it as "01-05-2014"?

 

var oDateTimeInput = new sap.m.DateTimeInput({});

oDateTimeInput.setDateValue(new Date());                   //shown as "May 1 2014"

 

 

2. Can someone explain what difference is between the following settings of DateTimeInput?

 

   ValueFormat

   DisplayFormat

 

Please write a short code example.

 

Thanks very much in advance!

 

Br,


Dong

 


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>