Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...retrieve values ​​(day, month and year) <dnn: currentdate ???retrieve values ​​(day, month and year) <dnn: currentdate ???
Previous
 
Next
New Post
4/27/2012 11:19 AM
 

Hi,

in the skin's file .ascx  how can i have :

- the value of the day in on variable  

- the value of the month in on variable

- the value of the year in on variable

from :

<dnn:CURRENTDATE runat="server" id="dnncurrentdate" DateFormat="dddd dd MMMM yyyy" />
               
PLEASE does anyone can help me ...

for the purpose of using these three variables in a program test javascript (in my home page ) ...

Regards

 
New Post
4/28/2012 4:06 AM
 
if you just want the text you may use a hidden display in a DOM element, you are able to access from the client, on the server you may use code behind to access current time. Can you be more specific about your needs?

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
4/28/2012 8:00 AM
 

Hi, Thanks for reply

ok, 

 

For exemple :

 

In my file skin.acsx i have :

 

<dnn:CURRENTDATE runat="server" id="dnncurrentdate" DateFormat="dddd dd MMMM yyyy" />

 

That display in my home page :

Saturday 28 April 2012

 

So , now : i add a text/html ‘s module in my home page to execute some test (in javascript)

 

Some thing like:

If (var_day == ‘28’)  ldquo;Some text …”);

If(var_day == ‘1’ && var_month == ‘july’)  ldquo;it’s the month of your birthday”);

 

… some stings like this …

 

But to do these things I have to collect the day, month & the year from the date (or from currentdate) to be used in my js ‘s programme

 

If I know this thing , I can do the same thing in canendar arab (to alert the important days in the year)

 

So , can you show me how to do or an idea about my question PLEASE

Cheers

 
New Post
4/28/2012 8:39 AM
 
In a script block you should be able to write somthing like...

var dd =  <%= DateTime.Now.Day %>;
var mm = <%= DateTime.Now.Month %>;

...to get the values from the server into js variables.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
4/28/2012 8:42 AM
 
Sorry - annoying editor took out the important bits. View the answer on the site.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...retrieve values ​​(day, month and year) <dnn: currentdate ???retrieve values ​​(day, month and year) <dnn: currentdate ???


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out