Validations for DatePicker control in SAP UI5

Hi,
I am using DatePicker control from sap.ui.commons library. I want to add validations to this date. What can be the best possible way to have validations apart from implementing change method ?
Is it possible for the framework to popup the error message in the red color as we get to see in some standard form?
Any help will be appreciated.
Thanks,
Supriya Kale

That's the beauty of the formatter and the use of a model:
var oDP = new sap.ui.commons.DatePicker({
    valueState :{
        parts     : ["/myDate", "/notBeforeDate"], //bound to both 'myDate' and 'notBeforeDate' property in your model
        formatter : function(oDateValue, oNotBeforeDateValue) {
            return (oDateValue < oNotBeforeDateValue) ? sap.ui.core.ValueState.Error : sap.ui.core.ValueState.None;
See Custom Formatter Functions - User Interface Add-On for SAP NetWeaver - SAP Library for more info

Similar Messages

  • SELECT OPTION Control in SAP UI5

    Hi all,
    is there a select option control in SAP UI5. I didn't find any description on the description page !
    Thanks for information.
    Best regards,
    Christoph

    Hi,
    the value help dialog has the select option handling included :-)
    SAPUI5 Explored
    Thanks for help.
    Best regards,
    Christoph

  • How to Stop confirmation popup arising for datepicker control in IE

    Hello All,
    I m using a confirmation popup to notify user when they try to navigate away from the page with out saving the changes made. I executed it through the javascript and it even works properly for most of the items and buttons except Datepicker control. This issue is only with Internet Explorer and all others are fine.
    I use the following block of code to do the job
    +function isFormChanged()
    {+
    var rtnVal = false;
    var frm = document.wwv_flow;
    var ele = frm.elements;
    for ( i=0; i < ele.length; i+ )
    {+  
    +if ( isElementChanged( ele, i ) )
    {+
    rtnVal = true;
    break;
    +}+
    +}+
    return rtnVal;
    +}+
    +function isElementChanged( ele, i )
    {+
    var isEleChanged = false;
    +switch ( ele.type ) {+
    case "text" :
    +if ( ele[i].value != ele[i].defaultValue ) return true;+
    +if( ele[i].id.indexOf('Date')!=-1) return false;+
    break;
    case "textarea" :
    +if ( ele[i].value != ele[i].defaultValue ) return true;+
    break;
    case "radio" :
    val = "";
    +if ( ele[i].checked != ele[i].defaultChecked ) return true;+
    break;
    case "select-one" :
    +if      (ele[i].id>99 ) return false;+
    +for ( var x =0 ; x <ele[i].length; x++ )
    {+
    +if ( ele[i].options[ x ].selected+
    +!= ele[i].options[ x ].defaultSelected ) return true;+
    +}+
    break;
    case "select-multiple" :
    +if      (ele[i].id>99 ) return false;+
    +for ( var x =0 ; x <ele[i].length; x++ )
    {+
    +if ( ele[i].options[ x ].selected !=+
    +ele[i].options[ x ].defaultSelected ) return true;+
    +}+
    break;
    case "checkbox" :
    +if ( ele[i].checked != ele[i].defaultChecked ) return true;+
    default:
    return false;
    break;
    +}+
    +}+
    var g_saving = false;
    var IsThe2ndNavAway = false;
    var g_errmsg="The changes you made to the page were not saved.";
    +function WarnSave()
    {+
    var formChanged = isFormChanged();
    if (!g_saving && formChanged)
    +{+
    if(!IsThe2ndNavAway)
    +{+
    IsThe2ndNavAway=true;
    +var tOut = window.setTimeout(function () { IsThe2ndNavAway = false; }, 0);+
    return g_errmsg;
    +}+
    +}+
    +}+
    function doSave()
    +{+
    g_saving=true;
    doSubmit('SAVE');
    +}+
    the above lines on page Html header and the Html body attribute with onBeforeUnload="return WarnSave();"
    Can any one say why the confirmation popup is pushed of in IE for DatePicker Calendar alone and provide the work around if any..

    Are you still having this problem?  See this post how one AOL user solved it: http://forums.adobe.com/message/3024814#3024814

  • Asking for help to install SAP UI5 in Eclipse Kepler?

    Can you provide me the navigation for installing the SAP UI5 development tools in Eclipse Kepler? I was to find the attached folder while creating the project. And can you send me any link to download the
    HTML5Evaluation_complete.zip   ?????
    I got the procedure in the link given, where the file is needed.
    The link is: _D:\SAP UI development\UI_Development_Toolkit_for_HTML5_Version_SAPUI5_1_16_3_278_MB\Readme_and_InstallationInformation.html
    Please get back to me with the solution.
    Thanks & Regards,
    Joyjit Biswas
    Mob: (+91) 9538730540
    Email: [email protected]

    Did you try downloading from this link
    http://download.store.sap.com/SCN/UI_Development_Toolkit_for_HTML5/UI_Development_Toolkit_for_HTML5_Version_SAPUI5_1_16_…

  • Experiences using CBTA for test of SAP UI5

    Hi All,
    We are looking into using CBTA for functional testing of SAP UI5 application.
    Are there any one who would share some experiences regarding this?
    Tanks in advance
    /Søren Amdi Bach

    Hi Stefan,
    while the JARs in the UI5 Eclipse plug-ins contain the same files and it would be possible, but a bit cumbersome to extract and combine them, you are of course right that the SCN trial is severely lagging behind.
    Unfortunately getting the SCN updated is a relatively complicated process which is not completely in our hands, so we recently focused on getting the OpenUI5 releases (which we control) reliably done. I let a colleague know who will try to do it this week (no promise). The version will then be 1.18.11.
    Regards
    Andreas

  • How to create interactive map in SAP Visual Business using SAP UI5 SDK

    Hi,
    Please tell me,
    How to create interactive map in SAP Visual Business using SAP UI5 SDK.
    Is it possible to create interactive map using VB Control in SAP UI5 SDK..?
    if possible please any one let me know.

    Hi folks, one question:
    We have our development close moved and now it is earlier than originally planned. 
    That means that we maybe can't finish our convenient API and you have to wait till we will release it - early 2015 is planned.
    But there is another option:
    Currently we have a API based on json. The developer has to create json and  to transfer it to the Visual Business control.
    This interface is more used as a low level API and we are developing on top the more convenient one. So all the features are the same.
    It will stay stable & compatible in the future and you can build on it.
    Do you want to use this interface?  
    Then I will publish the documentation.
    Let me know.
    Thanks

  • Table Control in SAP NetWeaver 2004

    Hello,
    I have a requirement for table control in SAP NetWeaver2004 Webdynpro for java (sp16), where i need a kindoff tablepopins as provided in 2004s.Is there anyway i can get it done or if there is any workaround to achieve  the same with sp16 NetWeaver2004.
    Thanks in advance
    Karthik

    Hi Valery,
    What i need looks something like this:
    col1 | col2 | col3 |
    ROW1                ( Header )
      colA | colB | colC | colD |
      ##ROW A              ( Item )
      ##ROW B              ( Item )
    ROW2
    ROW3
      colA | colB | colC | colD |
      ##ROW A              ( Item )
    I am not sure if the solution to Jack's problem will work for me and also a bit unclear on it. Will be greatful if any solution is suggested.
    Thanks
    Karthik

  • SAP Fiori: Version Management for SAP Gateway Enhanced Services & SAP UI5 Application

    Hello Experts,
    Greetings!!
    I would like to check how version control is achieved for SAP Fiori app extensions. Or while enhancing the SAP UI5 applciation or enhancing a SAP netweaver gateway backend service for Fiori App.
    I would appreciate your inputs. Thanks in Advance.
    Sudhanshu ~
    Tags edited by: Michael Appleby

    For front end SAPUI5 CODE in Elipse or RIVER RDE you can use GIT which is pretty standard way of doing code management. Once you push the code to GW it is in BSP and then you dont have much control on the version management side. If there are multiple developers working on front end code then you can push to GW using ABAP Team Provider plugin in Eclipse that pushes the sapui5 code to BSP via workbench request and once 1 developer is done then he/she will submit the code. the next person then does the GET from GW into their Eclipse to get the latest version of source code. But if there are 10 changes to the sapui5 code then on front end side you should use GIT or BitBucket or MS Team Share kind of source code control tools that integrate with ECLIPSE.
    For oData Service you can do version management in ABAP stacks. you can have multiple versions for your service and then deploy to prod the one that you are sure of. Std change management can be used for backend GW service development.
    thanks
    Ashish

  • Download of SAP UI5 resources for version: 1.18.8

    Hi all,
    I'm using version 1.18.8 of the SAP UI5 eclipse plugin and have built an app with it. As I'm using PhoneGap to build the .ipa and .apk archives for deployment to GooglePlay and iTunes App Store I'd like to build using the 1.18.8 version of the SAP UI5 resources in namespaces sap.m, sap.me and sap.ui.
    Where can I get those? The SAP UI5 evaluation pack for download on the UI5 developer centre is only 16.3. I can't unfortunately work with the Open UI5 version on Github (latest available here is 1.18.11) as it does not contain the sap.me package (including the calendar).
    Thanks for any insight.
    Stefan

    Hi Stefan,
    while the JARs in the UI5 Eclipse plug-ins contain the same files and it would be possible, but a bit cumbersome to extract and combine them, you are of course right that the SCN trial is severely lagging behind.
    Unfortunately getting the SCN updated is a relatively complicated process which is not completely in our hands, so we recently focused on getting the OpenUI5 releases (which we control) reliably done. I let a colleague know who will try to do it this week (no promise). The version will then be 1.18.11.
    Regards
    Andreas

  • Unable to create a new view for SAP UI5 in NWDS

    Hi UI5 Profis,
    I'm just getting started with SAP UI5 and wanted to create and run my first application using the UI5 Tools wirh NWDS. After having installed NWDS and the UI5 Tools
    I create new SAP ui5 project, but the wizard always run into error, when I want to create new view.
    Did someone already have the same issue?
    Thanks in advance,
    BR,
    Berenger

    Hi Berenger,
    Which is your NWDS version?
    It seems there is a bug on view creation with 1.8.8 version:
    1814417 - Patched version 1.8.8 of UI Development Toolkit for HTML5
    http://service.sap.com/sap/support/notes/1814417
    Kind regards

  • Issue when installing SQL Server Express 2012 - "The requested control is not valid for this service" + "Could not find the database engine startup handle"

    Good morning,
    I'm experiencing the following issue when installing Microsoft SQL Server Express 2012 (with tools, SQLEXPRWT_x86_ENU.exe) on the laptop of my company;
    Installation goes plain until around the end of the progress bar, it stops on the setup of
    SqlEngineDBStartConfigAction_install_configrc_Cpu32
    giving 7-8 times, even pressing "Cancel", the message "The requested control is not valid for this service";
    After this, I receive one last message ""Could not find the database engine startup handle", then installation ends with failures, in particular the Database Engine and the Server Replication failed to be installed.
    I've put in my SkyDrive the error log I received after the install;
    I'm at full disposal if you need further information,
    thank you in advance
    Best regards
    Francesco

    Well, i just ran into this issue and the problem was lack of admin rights. It was my company's laptop so got the setup initiated by my company's IT team with admin rights. However, the upon completion of setup, i go the same error messages as stated above: 
    SqlEngineDBStartConfigAction_install_configrc_Cpu32
    giving 7-8 times, even pressing "Cancel", the message "The requested control is not valid for this service";
    After this, I receive one last message ""Could not find the database engine startup handle", then installation ends with failures, in particular the Database Engine and the Server Replication failed to be installed.
    Also, if you open SQL Server Configuration, the status of the service is "Change Pending" and you would not be able to set the startup login type to Local Service/System/Network.
    Then, I just got my account added as Local Admin and then tried to start the service and was able to.
    However, I am not sure whether same was the case for you.
    Please mark the answer as helpful if i have answered your query. Thanks and Regards, Kartar Rana

  • How can we do the validation for non visible records in table control.

    Hi Experts,
      I have a table control which displays list of material details. I have a button to upload the material details from excel file to table control directly. I have to validate all the customers which are exist in the table. But my item (Material) table control displays only 5 rows i.e only 5 entries are visible in module pool screen. The validation is done for 5 records only in PAI event, but i need to do validation for rest of the records too (Which are not visible on items table), if validation fails then needs to display error message.
      How can we do the validation for non visible records in table control.
    Regards,
    Bujji

    Hi,
    try validating material before displaying it in table control...'
    Rgds/Abhhi

  • Upload image from Mobile device using SAP ui5 controls

    Hello Team ,
    Can we use SAP UI5 controls to upload image from photo gallery of the mobile device, the idea is to use simple sap UI5 codding and not SMP.
    please do let me know if you guys have idea on same.
    Armaan 

    Hi Armaanjit,
    Please have a look at my post
    File upload using SAPUI5 Control

  • Creating a Validation for WBS Element in the Asset Master Record

    I would like to know how to create a validation in the AMR for the WBS Element field. I would like to have a particular Business Area when used be required to only use a WBS element that starts with, let's say, AL. Can someone shed some light on how I would set up my check in OACV?

    Hello
    You can validate or substitute data directly at the input stage. You make the settings for validation and substitution in the Implementation Guide (IMG) for Controlling, under Controlling General ® Account Assignment Logic ® Define Validation or Define Substitution
    Substitution and validation are only intended for actual postings
    For a complete description of validation and substitution, see the SAP Library under Accounting - FI Financial Accounting ® Special ledger ® Tools ® Validation and Substitution Rules
    Coordinate with ABAPer and make settings.
    Reg
    *assign points if useful

  • Validation for Customer Incoming Payment

    Dear All,
    We are facing one issue regarding customer incoming payment. When user is making income payment via f-28, he enters the credit control area and GL Account according to division.
    Problem is, though customer master in Sales Area is not maintained, system allows to post the incoming document. Due to it, customer credit limit does not get updated and we have to update it manually every time by resetting the customer master.
    Do anyone have any validation for that in F-28?
    Regards,
    Jigar

    Hi,
    Look in to the given link for Create Validations.
    http://help.sap.com/saphelp_erp60_sp/helpdata/EN/5b/d231e143c611d182b30000e829fbfe/frameset.htm
    Regards,
    Sridhar Sha

Maybe you are looking for

  • How did Nickname field in Address Book get filled in?

    I went to send an email to myself (I send to-do lists to myself because I forget everything ) from my imac and when I typed in my name, I noticed that in front of all of my email addresses, the label "Princess" was showing up. I had NEVER seen this b

  • My neighbor TC is interfering with my Airport

    My Airport Epress wifi network started acting up a few days ago: unable tto acquire IP address, intermittent drops, slow to connect to web sites, dropped Skype calls, very inconsistent download rates. At the same time my neighbor's (we bot have encry

  • E-Filing IYMV Submitting P45's to the HMRC

    Hi Guys, We have successfully e-filed our EOY using B2A manager. I know want to use E-filing to submit p45's electonically. To test this I have run the report in transaction PC00_M08_CP45_PBS for a test employee who is active, therefore I have checke

  • Quantity field for user input in interactive alv

    hi, i have created an interactive alv report that allows user to key in quantity fields using fm "REUSE_ALV_LIST_DISPLAY'. then quantity field is referred to MARD-LABST for instance, with 3 decimals point. When i tried to key in quantity as '9', it t

  • Firefox load-time steadily increasing. No change of Add-ons

    Hi to all readers ! I have been running Firefox as my browser on a Linux PC system for many years. I do a lot of web searching for scientific information, so I have many Add-ons installed. Over the years, the boot-up time has steadily increased to ar